Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive performance improvement with large [25k+] documents in WPF. #95

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ben-abraham
Copy link

Can now easily handle 25k+ line files in side-by-side mode.

  • Fully convert InternalLinesViewer to using virtualized component rendering
  • Added a basic ViewModel for InternalLinesViewer (LineViewerLineData). Supports dynamic visibility changes.

You can increase the repetitions in MainWindow.xaml.cs to 1000 to get a 25k line document, which is handled on my system easily.

Let me know if there are any improvements you can offer. The style mechanism could be improved to be more pure-wpf, and I think the font properties might already inherit by default (although I'm not 100% sure about this one, I need to test it)

…easily handle 10-20k+ line files.

- Fully convert InternalLinesViewer to using virtualized component rendering
- Added a basic ViewModel for InternalLinesViewer (LineViewerLineData). Supports dynamic visibility changes.
@ben-abraham ben-abraham marked this pull request as draft July 5, 2022 04:54
Cleaned up the GoTo helper functions significantly.
@ben-abraham
Copy link
Author

Note: a big missing feature with this now, is that you can't highlight/select the text at all since they are now TextBlock objects.

There are a few solutions that could fix it I think, but they would be fairly involved.

@mmanela
Copy link
Owner

mmanela commented Jul 13, 2022

@ben-abraham Thanks for contributing. It's an interesting change although making text not selectable is a bummer.

@kingcean can you take a look and share any thoughts?

@kingcean
Copy link
Contributor

Looks good!

@ben-abraham
Copy link
Author

Sorry for the lack of update, I'm trying to implement this with Document/Span elements directly without virtualization, which seems performant enough by itself, and should allow selection to work as well. Just having trouble getting the look to match quite right, so I kind of have to rework the WPF styles to make it work correctly. Also a few bugs related to scroll bars that need to be sorted out.

@mmanela
Copy link
Owner

mmanela commented Jul 13, 2024

@ben-abraham It has been a while, so pinging on this. Are you still interested in moving this forward (with or without your follow up changes). I am looking at doing some housekeeping and seeing if this is something we can get it to help it be lean and fast.

@smeddows
Copy link

@ben-abraham It has been a while, so pinging on this. Are you still interested in moving this forward (with or without your follow up changes). I am looking at doing some housekeeping and seeing if this is something we can get it to help it be lean and fast.

I think this is the issue I was seeing with #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants