Open Elilif opened 10 months ago
I'd say it's a useful optimisation.
Totally agree and I'm doing such caching in other libraries that use svg-lib but I do it very badly compared to your code. So yes, a PR would be warmly welcome indeed. Can we do it for every tag functions or do you foresee some problems ?
I noticed that every time a new keyword(such as "TODO") is inserted,
svg-tag-make
(or similar functions) is called. I think this is unnecessary because the same parameters will always generate the same image. So is it possible to add a cache to use the cached image in the case of the same parameters?For instance:
In my case, I found that when using SVG tags in the tab-bar or modeline, using caching significantly reduces resource consumption.
Is it worthwhile to create a PR?