in-mem cache for constructed properties
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 82
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 205
Description
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.
It might also be worth considering to change the Property URLs to u8 when storing to the database. We could have a map for every u8 to URL, which helps compress the data. However, it will make debugging harder and could introduce data loss if we ever have issues with this mapping table.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Storelike.get_property method and trace how resources are fetched and converted into Properties. Evaluate the proposed in-memory HashMap cache first; the work is done when repeated property lookups use the cache without changing behavior, while the optional u8 URL mapping remains a separate design consideration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100