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

Build a caching stringformatter #58

Open
JonnyOThan opened this issue Jan 10, 2023 · 1 comment
Open

Build a caching stringformatter #58

JonnyOThan opened this issue Jan 10, 2023 · 1 comment
Labels
performance Optimization to make it faster

Comments

@JonnyOThan
Copy link
Collaborator

A lot of time is spent assembling strings from variables etc. It might be better to pre-parse the insertion points etc and have a more efficient way to build the strings rather than recalculating it from scratch every time

@JonnyOThan JonnyOThan added the performance Optimization to make it faster label Jan 10, 2023
@JonnyOThan
Copy link
Collaborator Author

JonnyOThan commented Jan 12, 2023

In addition it might be smart to cache the last output string, and only update it if the variables changed.

NOTE: this has now been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Optimization to make it faster
Projects
None yet
Development

No branches or pull requests

1 participant