Limit line decoration update to visible row range #13486

Merged
merged 1 commit into from Dec 22, 2016

Projects

None yet

1 participant

@nathansobo
Contributor
nathansobo commented Dec 22, 2016 edited

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

@nathansobo nathansobo 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.
8fbf42d
@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