atomic-server
atomic-server copied to clipboard
in-mem cache for constructed properties
Many calls rely on Properties. Every time you set some value using a string, for example. This means that the get_property method in Storelike is called a ton of times. This method currenlty relies on fetching a resource and converting it to a Property.
It's pretty fast, but it can be way faster if we memoize the Properties in a Hashmap.
This is definitely the biggest bottleneck at the moment for parsing JSON-AD resources, including Commits. Takes 4ms in debug mode with tracing.
Implementations:
- https://crates.io/crates/memoize -> Probably won't work as a method.
- https://github.com/jaemk/cached -> Also won't accept
Self, whichStorelike::get_property(&self, subject)currently does.