-
-
Notifications
You must be signed in to change notification settings - Fork 403
Performance fixes for larger files #1462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This diminishes the cost for this - one element of somewhat fixed size (no vec pushing) - one element given to gtk that can tile this as it pleases with less buffer pushes
We use the rtree to find the element in the viewport, mark these ones using a hashmap, call the rendering function, then remove the rest by iterating on the keys a second time, filtering on keys not in the hashmap
Do not leak key trees out of the store structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when this lands these are nice improvements to the rendering part of the engine. I added some comments
|
Only storing non-trashed strokes in the R-Tree is problematic and will require additional changes in other parts - essentially everywhere where one of the methods of |
… `push_repeat` instead) `push_repeat(x,None)` will take the whole not and repeat it
that would push a 'current' stroke key to the rendering keys
And remove now superfluous filters on the trash status for the outputs of the `key_tree`
…ectly The information is there already, and it is probably more effective to get the value from the keytree rather than recalculating it on the fly on each event
|
I'm trying to rely more on the keytree to get stroke bounds whenever possible (as calculating a bunch of stroke bounds on each event is potentially pretty expensive). Testing the two keytree solution, I'm encountering quite weird results with the splitting eraser |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
good to know, but not really relevant for the technical discussion this PR should focus on @Intranox |
Fixes #1436
(and maybe #1438, waiting on a response)
push_repeatfor background nodes : This seems to reduce RAM usage and buffer uploads to the gpu so there's more headroom for the rest of the nodesregenerate_rendering_in_viewport_threaded: We use the rtree to get the strokes in the viewport without recalculating any stroke bounds, and get the ones not in the view by iterating on keys and using a hashmap to filter out the previously selected onesOn that subject, it seems we could use a https://docs.rs/slotmap/1.0.7/slotmap/sparse_secondary/struct.SparseSecondaryMap.html for the render components and/or be smarter on clearing the
render_compcomponents of strokes (we know there's no work to do if we have x strokes in view that we just initialized the rendering components and x strokes in the rendering component slot)I've updated the rtree to only keep bounds for visible strokes (so trashed strokes are removed from the tree)
I've also added to the visual debug mode a way to see the envelope of the whole rtree (marked by orange bounds)