mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Refactor force_refresh path to use thread pool execution instead of blocking the event loop shared with ComfyUI. Key changes: - Fix 1: Route force_refresh through _initialize_recipe_cache_sync() in thread pool - Fix 2: Add GIL release points (time.sleep(0)) every 100 files in sync loops - Fix 3: Move RecipeCache.resort() to thread pool via run_in_executor - Fix 4: Persist cache automatically after force_refresh - Fix 5: Increase yield frequency in _enrich_cache_metadata (every recipe) This eliminates the ~5 minute freeze when rebuilding 30K recipe cache. Fixes performance issue where ComfyUI became unresponsive during recipe scanning due to shared Python event loop blocking.