Performance: 'Minimal' layout mode #369
Merged
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 is a change to add an alternate layout mode - a streamlined layout when portions of the tree just need to be positioned absolutely relative to the direct parent or via transforms. This saves expensive layout calculations.
This adds a style
layoutMode
with the settings ofDefault
orMinimal
. This is an advanced-use-case setting (ie, trying to squeeze extra perf out of the layout system in constrained cases), but shouldn't be something you need day-to-day. In Onivim2, I'm experimenting with rendering the lines in the minimap with this strategy (although longer term - would like to render directly to a pixel buffer!)This also adds an initial set of benchmarks via 'reperf'`, and highlights the difference between the standard layout and the 'minimal' layout strategy:
This should help lower the layout cost when re-rendering Onivim 2, although more work is still needed (in my current benchmarks - lowered the cost ~50%). We should still explore generally improving the layout nodes - regenerating the layout tree is very costly!