You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(perf): Skip parsing when no text changes and in already parsed range
# Details
Issue: #115
After the change to parse only the visible range of a file along with
a debounce there was a performance degredation for simple cursor movements.
This is because cursor movements no longer had the benefit of using
cached marks, so are re-computed and feed into the same debounced method.
This can cause laggy behavior.
To fix this I have added back the caching behavior from before with some
updates to account for the new logic. Like before marks will not be parsed
for events that do not update the text. In addition to the simple event
check we also need to validate that the range of cached marks accounts
for everything in the users viewport, otherwise we still need to parse.
This should have the benefits of the snappy behavior from before along with
being able to handle essentially arbitrary file sizes. Have increased the
default max file size to 10MB since performance impact is minimal.
0 commit comments