_build_category_index() was the one tree-scanning function never wrapped in the app's existing 5-minute cache - it ran fresh on every File Management page load and Sort Unsorted scan (not a manual "this may take a moment" action like Duplicate Courses or Storage Usage), so the cost was invisible until it was already slow. Measured ~1.0-1.1s consistently against the live NAS-mounted library at 161 courses, confirmed via profiling that a single call makes dozens of iterdir() round-trips - each one a network hop over SMB. Now shares the same cache_get_or_compute pattern and invalidate_cache() call sites as get_all_course_dirs(), so no new invalidation logic was needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 lines
73 B
Plaintext
2 lines
73 B
Plaintext
2026-08-24 21:41 UTC — cache category tree walk (fixes ~1s picker lag)
|