-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Proof-of-concept: lazifying measureLineInner #1613
Conversation
I agree that this might have more future than the other approach. Have you thought about how to address the fact that |
I have some thoughts about this that should considerably reduce amount of large hops; i'll try to implement this after I polish/finish this patch. |
I haven't read this in detail yet, but yes, in principle I am open to merging something like it -- I'll spend some more time on this next week, after 3.14 is released -- I try not to merge scary patches shortly before releases. |
Looks like there's no need for this: measurements are not recreated but full-filled with missing info instead. |
Status update:
To sum up, at the moment this patch works reasonably good for non-wrapped code editors that does not heavily use 'markText' functionality, which sounds really promising. Still, there is a lot to be done to bring it to finished state. |
Do you still plan on working on this? |
It does not look like this is solid enough to merge, or easy to adjust. If someone (Google? @ibdknox?) wants to pay for two weeks of my time to do the serious engineering needed to land a feature like that, that'd work for me. But as it stands, this looks too destabilizing for me to risk landing it. |
That may be a possibility, I've been thinking about working with you on a general "attack performance" gig (specifically this and line numbers). Not quite at that point though. |
Something like this now exists in the v4 branch. Closing this. |
This is a proof-of-concept that does lazy measurement of long lines and partly addresses issue #1022.
To be more specific, when one requests measurement information regarding char
N
, itmeasures information for characters in
[N-50, N+50]
. The rendering is done in a following fashion:[N-50, N+50]
range are rendered as-is[N-50, N+50]
range are splitted into charsWith this patch rendering a single line with 75k characters gets done in
300ms
instead of16000ms
.It's not a finished thing and it has couple of unhandled cases; though this effort should obsolete pull request #1609 as it works fast, doesn't require monospaced font and supports (in theory) wrapped lines.
How do you feel about it?