You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, the cache system reads from disk every time a request is made. This can be slow, especially for large directories. Implementing an in-memory cache would significantly improve performance by storing frequently accessed data in RAM.
Problem
Every request requires reading from the cache file, causing I/O overhead.
Large cache files slow down retrieval times.
No mechanism exists for quick lookups of previously fetched data.
Proposed Solution
Use lazy_static and HashMap<String, Vec<PathBuf>> to store recently accessed cache data in memory.
When fetching cache data:
Check if the data exists in memory.
If not, read from disk, store it in memory, and return the result.
If yes, return directly from memory for a faster response.
Expected Benefits
Reduces disk reads for frequently accessed cache files
Improves performance for repeated requests
Makes cache retrieval instantaneous after the first load
Record
I agree to follow this project's Code of Conduct
I want to work on this issue
The text was updated successfully, but these errors were encountered:
@Pranav0-0Aggarwal, Along with this, I have created two additional issues related to cache and memory optimization. I have already worked out solutions for all of them and would love the opportunity to implement these improvements.
These optimizations will significantly enhance performance, reduce disk I/O overhead, and improve the overall efficiency of the caching system. Let me know if I can proceed with these!
Describe the feature
Implement In-Memory Caching for Faster Reads
Description
Currently, the cache system reads from disk every time a request is made. This can be slow, especially for large directories. Implementing an in-memory cache would significantly improve performance by storing frequently accessed data in RAM.
Problem
Proposed Solution
lazy_static
andHashMap<String, Vec<PathBuf>>
to store recently accessed cache data in memory.Expected Benefits
Record
The text was updated successfully, but these errors were encountered: