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 SVG render by md5 hash of TypeGraph #197

Closed
wants to merge 4 commits into from

Conversation

Claudiohbsantos
Copy link

When loading very large schemas the SVGRender.renderSvg method takes a very long time to calculate the svg. In larger projects the schemas don't change that often, so caching the svg string is a good way to avoid having to recalculate the svg on every page load.

I used a md5 hash of TypeGraph to identify schemas and use the hash as the key for caching using localStorage.

This could probably be improved with eviction strategies or other fancier mechanisms but first I wanted to make sure there was interest in the feature.

IvanGoncharov added a commit that referenced this pull request Aug 8, 2023
Fixes #197 and working on super big graphs
IvanGoncharov added a commit that referenced this pull request Aug 8, 2023
Fixes #197 and working on super big graphs
IvanGoncharov added a commit that referenced this pull request Aug 8, 2023
Fixes #197 and working on super big graphs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant