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

Store metadata in alternative structure to increase initialization performance. #236

Open
Quanhua-Guan opened this issue Oct 29, 2018 · 2 comments

Comments

@Quanhua-Guan
Copy link

When more and more data cache in DiskCache, the startup can cost a lot of time, and before that we can not get data from disk cache.

@Quanhua-Guan
Copy link
Author

Test on iPhone 8 Plus

Item count Cached | time used to init PINDiskCache

  • 228 | 24~27ms
  • 1000 | 30~32ms
  • 10000 | 123~125ms
  • 100000 | 3651ms = 3.651s

@garrettmoon
Copy link
Collaborator

@Quanhua-Guan the disk cache initializes asynchronously in part to address these issues, but you're right, there may be a way to increase startup performance by storing metadata in a different place – sadly this would require a major rewrite of the disk caching layer.

@garrettmoon garrettmoon changed the title For DiskCache, Why not cache meta datas? or use Sqlite to store meta datas? Store metadata in alternative structure to increase initialization performance. Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants