Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Always return an empty array in TokenizedBuffer.getInvalidatedRanges #12745

Merged
merged 1 commit into from
Sep 21, 2016

Conversation

as-cii
Copy link
Contributor

@as-cii as-cii commented Sep 21, 2016

Previously, we were always mistakenly returning [(0, 0), (0, 0)], thus causing the first line of a file to be constantly invalidated. This caused also a performance regression for long lines with lots of highlight decorations at row 0, because any change in the buffer at other rows caused that line to be re-rendered and, therefore, re-measured as well. This was a contributing factor in the performance problem mentioned on #12662.

Since TokenizedBuffer never synchronously invalidates beyond the extent of the spatial change we can simply return an empty array instead.

..because TokenizedBuffer never synchronously invalidates beyond the
extent of the spatial change.

Signed-off-by: Nathan Sobo <[email protected]>
@as-cii as-cii merged commit bc2292e into master Sep 21, 2016
@as-cii as-cii deleted the as-tokenized-buffer-invalid-range branch September 21, 2016 17:07
as-cii pushed a commit that referenced this pull request Sep 22, 2016
Always return an empty array in TokenizedBuffer.getInvalidatedRanges
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant