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 scan folder result #26

Closed
mhtvsSFrpHdE opened this issue Aug 21, 2022 · 2 comments
Closed

Cache scan folder result #26

mhtvsSFrpHdE opened this issue Aug 21, 2022 · 2 comments

Comments

@mhtvsSFrpHdE
Copy link
Owner

In 2.3,
unused file thread are removed after first prefetch.

I notice that the thread overhead is almost zero,
but Windows take vast of time to iterate through the file system and list all file.
This is much slower than expected.

Instead of scan all 26968 files, use a config array as cache?

@mhtvsSFrpHdE mhtvsSFrpHdE changed the title Static file list Cache scan folder result Aug 21, 2022
@mhtvsSFrpHdE
Copy link
Owner Author

mhtvsSFrpHdE commented Sep 12, 2022

Cache

Create cache

  • Core\scan_cache.h, Core\scan_cache.cpp e18cb43
  • Confirm or modify thread pool object to extract file path b191afc
  • Save file path to cache after each scan c3f801b
    • [ScanFolder]
    • Generate key name use array index start from 0
    • Get setting ini name, cache name will be setting.cache.ini

Confirm cache exist 83abdda

  • Bool function cache ini exist on disk (available)
  • No support for fuzzy|damaged ini, use directly

Use cache 9ff27ef

  • Before each scan, if cache available, use cache||skip scan
  • Read array value and restore to read thread, to thread pool

Cache expire

  • What is the cache expire rule? How about RescanInterval?
    • Ram variable cache_expired, cache_use_count, greater|equal to RescanInterval, true
    • Function to expire cache 25f4ac0

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

No branches or pull requests

1 participant