This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Use 1-dimensional marker index #103
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR swaps out the original 2D marker index with a dependency on the new marker-index library.
The 1D index is more efficient and less memory intensive, but using it here requires more translation between 2D row/column coordinates and character indices when using markers. We should investigate the overhead of that translation before merging this and possibly wait until we apply some planned optimizations to the mapping.
I was hoping this might be the solution to our marker population pauses when executing large searches, but though it improves things, on its own it isn't a big enough improvement. So I'm going to try a completely different approach that limits the overhead of find and replace highlights to the visible row range. I also plan on using the 1D marker-index in that code, so ultimately it would be good to use in the text buffer as well so we only have to maintain the code of a single marker index.