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

Cache layout information for selection navigation #118

Open
davidbalbert opened this issue Mar 6, 2024 · 0 comments
Open

Cache layout information for selection navigation #118

davidbalbert opened this issue Mar 6, 2024 · 0 comments
Labels
performance Performance improvements

Comments

@davidbalbert
Copy link
Owner

Some Selection movements – moving up and down by line fragment or by page – are layout dependent. Right now, we only cache layout information for the portion of the document that's visible in the scroll view, so if the caret is outside of the scroll view when you navigate, layout will have to happen then.

This is not an issue with a single caret, but once we support multiple carets, this could get costly fast (imagine having 10,000 carets and pressing the down arrow).

Even if we cache those, an operation like "add a caret at the beginning of every line" could be very expensive if we layout all the lines right then, so we might want to think about doing some of the layout when you create a new caret in the background.

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

No branches or pull requests

1 participant