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

Cache snap state in memory #2980

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Cache snap state in memory #2980

wants to merge 4 commits into from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jan 7, 2025

To improve performance when using state, especially when using the new state methods (#2916), we now cache state in memory, and write updates to disk asynchronously. The first time the state is fetched, it's cached in the Snap's runtime data, which is used in subsequent calls.

@Mrtenz Mrtenz force-pushed the mrtenz/cache-state branch from 19202f3 to 1a95f6b Compare January 8, 2025 13:06
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.73%. Comparing base (5159929) to head (3916cc7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2980   +/-   ##
=======================================
  Coverage   94.72%   94.73%           
=======================================
  Files         497      498    +1     
  Lines       10826    10854   +28     
  Branches     1654     1659    +5     
=======================================
+ Hits        10255    10282   +27     
- Misses        571      572    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mrtenz Mrtenz marked this pull request as ready for review January 8, 2025 13:40
@Mrtenz Mrtenz requested a review from a team as a code owner January 8, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant