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

Limit line decoration update to visible row range #13486

Merged
merged 1 commit into from Dec 22, 2016

Conversation

Projects
None yet
1 participant
@nathansobo
Copy link
Contributor

nathansobo commented Dec 22, 2016

Previously, if we had selections exceeding the visible range we still add line decorations to the cache for every row in the selection, including rows that were off screen and not rendered. This resulted in massive slowdowns when rendering with a large selection.

Here's some profiles showing me scrolling a 250,000-line file with a single selection spanning the entire file.

Before this change, 500ms frames and terribleness:

screen shot 2016-12-21 at 6 27 25 pm

After this change, the line decorations don't appear in the profile, frames down to ~10ms.

screen shot 2016-12-21 at 6 28 43 pm

/cc @maxbrunsfeld

Limit line decoration update to visible row range
Previously, if we had selections exceeding the visible range we would do
a bunch of unnecessary work and rendering would become very slow.

@nathansobo nathansobo merged commit 49c6ab0 into master Dec 22, 2016

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@nathansobo nathansobo deleted the ns-constrain-line-decoration-update branch Dec 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment