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

Port existing string-key caches to use an integer hash key #2028

Closed
maxkfranz opened this issue Dec 8, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@maxkfranz
Copy link
Member

commented Dec 8, 2017

Ref : Use integer hash for style property hint keys #2027

While the style property hint keys are the main usecase for the hash function, it can also benefit other existing caches.

@maxkfranz maxkfranz added this to the 3.3.0 milestone Dec 8, 2017

maxkfranz added a commit that referenced this issue Dec 8, 2017

Revise node path caching #2028
- Use the hash function for node path cache keys
- Cache node paths per-renderer rather than per-node

maxkfranz added a commit that referenced this issue Dec 8, 2017

Revise edge arrow path caching #2028
- Use the hash function for cache keys
- Reduce the cache key value tuple (size, shape, angle, x, y) to (shape)
- Store the cache per-renderer rather than per-edge

maxkfranz added a commit that referenced this issue Dec 8, 2017

Update the text dimensions cache re. hashing keys #2028
- Use the hash function to generate cache keys instead of using concatenated strings.
- Chain the hash with the label dimensions key from the style hints.
- This removes the need for the extra key.

maxkfranz added a commit that referenced this issue Dec 8, 2017

d2fong added a commit that referenced this issue Dec 14, 2017

Nodes should each store a ref to the path cache for images to align p…
…roperly #2028

Max & Dylan : Debug PathwayCommons/app-ui not showing SBGN bg images (they seem shifted if you turn clipping off)

maxkfranz added a commit that referenced this issue Dec 14, 2017

Node path caches should be stored per-renderer rather than per-node, …
…even if a ref to the path is stored in the node. #2028

Ref 17b2a8d

maxkfranz added a commit that referenced this issue May 4, 2018

Element texture caching uses style property hashes
- Add hash unit tests.
- Make property groups : These are used for creating group hashes, as some properties don't visual output.
- Optimisation for style hash calculations : Calculate the hashes for property groups a more cheaply by only considering non-default prop values and iterating over the overridden  keys in `ele._private.style` rather than the entire group prop list.
- Pie style property hints use the property group hashes.
- Add `ElementTextureCacheLookup` : a lookup table for (ele, scaleLvl) tuples based on the style hashes.  If N elements share the same hash, then there is only one rendering with N blits -- blits being cheap and renderings being expensive.  This will help performance greatly on graphs with many nodes that are the same apart from label (once separate label textures are implemented #1270).
- The `ElementTextureCacheLookup` can be re-used for implementing separate caches for edge arrows #1616 and element labels #1270.
- Misc. formatting improvements to cache code and stylesheet code.

Completes:

- Port existing string-key caches to use an integer hash key #2028
- Use integer hash for style property hint keys #2027

@maxkfranz maxkfranz closed this May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.