* Warm up TaskManager indexes for better performance
()
| 396 | * Warm up TaskManager indexes for better performance |
| 397 | */ |
| 398 | async warmupProjectIndexes(): Promise<void> { |
| 399 | try { |
| 400 | // Simple approach: just trigger the lazy index building once |
| 401 | // This is much more efficient than processing individual files |
| 402 | // Trigger index building with a single call - this will process all files internally |
| 403 | this.cacheManager.getTasksForDate(new Date().toISOString().split("T")[0]); |
| 404 | } catch (error) { |
| 405 | tasknotesLogger.error("[TaskNotes] Error during project index warmup:", { |
| 406 | category: "internal", |
| 407 | operation: "project-index-warmup", |
| 408 | error: error, |
| 409 | }); |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | /** |
| 414 | * Public method for views to wait for readiness |
no test coverage detected