mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
The recursive directory scan was running every time the user opened the note browser, rescanning 13k+ files repeatedly. This was slow and wasteful. Changes: - Add vaultFilesCache object with files, timestamp, and TTL (5 min) - Check cache before scanning in getVaultFiles() - Cache results after successful scan - Add clearVaultCache() function for manual refresh - Add forceRefresh parameter to bypass cache - Log cache hits vs misses for debugging Performance: - First load: Scans vault (slow, but only once) - Subsequent loads: Instant (uses cache) - Cache expires after 5 minutes (auto-refresh) - User can manually clear cache if needed This makes opening the note browser instant on subsequent uses. |
||
|---|---|---|
| .. | ||
| cloud.js | ||
| export.js | ||
| load.js | ||
| obsidian-bridge.js | ||
| save.js | ||