-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store: switch in-memory cache to LRU-based HashMap to cap memory usage
I just choose "clru" because it already exists in our dependency tree thorough gix. I don't think LRU is the best cache eviction policy for our use case (a simpler FIFO-based one might be good enough?), but it wouldn't matter for CLI or GUI use case. I don't see significant performance degradation with "jj log --stat -n1000". RwLock is replaced with Mutex since get() is inherently a mutable operation.
- Loading branch information
Showing
1 changed file
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters