Skip to content
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

Cache element textures per style context stack #1337

Closed
maxkfranz opened this issue Apr 20, 2016 · 0 comments
Closed

Cache element textures per style context stack #1337

maxkfranz opened this issue Apr 20, 2016 · 0 comments
Labels
performance Improving speed and memory usage
Milestone

Comments

@maxkfranz
Copy link
Member

maxkfranz commented Apr 20, 2016

Caching element textures per context stack for style means that if there are lots of elements of the same style, then those elements share a single texture. This would improve the painting time for nodes on most graphs -- where there are a lot of nodes of the same style and only the label is different.

Depends on #1270, #2027

@maxkfranz maxkfranz added the performance Improving speed and memory usage label Apr 20, 2016
@maxkfranz maxkfranz added this to the future milestone Apr 20, 2016
@maxkfranz maxkfranz modified the milestones: future, 3.3.0 May 31, 2018
maxkfranz added a commit that referenced this issue Jul 4, 2018
…texture cache invalidations

- N.b.: Some further minor changes for performance improvements are marked with "TODO"
- Don't require parallel edges iteration in `eles.boundingBox()` re. rendered style recalculation
- Shift the cached bounding box on node position changes -- rather than complete invalidation
- Simplify the rendering `notify()` function
- Simplify batching code
- Refactoring of control point calculations
- Simplify rendered style queuing to do traversals only on ticks
- Make the stylesheet more minimalistic
- Ensure that the element texture cache is not invalidated when the style hash is unchanged
- Style-originating triggers are organised per property

Ref: #1881 #2027 #2145 #1337
maxkfranz added a commit that referenced this issue Sep 6, 2018
…. Squash merge label-texture feature branch:

- Parameterise the element texture cache with the key lookup and drawing functions.  This is currently used for element bodies and element labels.  It could also be applied to edge arrows.
- Store separate bounding boxes for the labels, element bodies, and edge arrows.  These bounds are necessary for using the element texture caches.
- Update the cached bounds shift strategy to take into account the sub-bounds.  Update the shift a bit more lazily so it's less ops per shift --- and only shift the individual values once per n-miss-1-get cycle.
- Caches within a texture are recoverable as long as the texture is not retired.  This reduces memory usage and increases execution speed.
- Fixes `ElementTextureCacheLookup` diffs.
- Updates to `ele.boundingBox()` docs.
- Increase the levels at which the element texture cache can operate to try to get more hits.

Refs:

- Cache element textures per style context stack #1337
- Cache label textures separately from element textures #1270
- Cache edge arrow textures separately #1616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improving speed and memory usage
Projects
None yet
Development

No branches or pull requests

1 participant