Fantasy-Map-Generator/modules/io
Claude ace6867259
feat(obsidian): build complete FMG ID index on startup
Problem: With hundreds/thousands of burgs and markers, building the FMG ID
index one-by-one as you click each element is too slow. Users need instant
lookups at scale.

Solution: Build the complete index upfront on startup by reading ALL notes'
frontmatter during the pre-warm phase.

How it works:
1. On startup/connection test: Pre-warm cache runs
2. After scanning file list: buildCompleteIndex() runs
3. Reads frontmatter from ALL 13k+ files
4. Extracts fmg-id from each note
5. Builds complete fmg-id → path mapping
6. Saves to localStorage

Benefits:
- Day 1: All burgs/markers with notes have instant lookups
- No gradual index building needed
- Scales to thousands of elements
- Index persists across page reloads

Performance:
- Initial build: One-time cost on startup (background, non-blocking)
- All subsequent clicks: Instant O(1) lookup
- Manual rebuild: ObsidianBridge.buildCompleteIndex()

Console output shows: 'Complete FMG ID index built: X notes indexed, Y skipped'
2025-11-14 06:35:25 +00:00
..
cloud.js chore: parse DEBUG setting as an object 2024-10-22 14:45:25 +02:00
export.js fix(v1.108.11): add external icons to export in base64 format 2025-07-18 02:31:10 +02:00
load.js fix(v1.108.13): add comprehensive race condition guards in load.js 2025-11-14 03:30:12 +00:00
obsidian-bridge.js feat(obsidian): build complete FMG ID index on startup 2025-11-14 06:35:25 +00:00
save.js chore: remove debug logging from default map feature 2025-11-14 03:55:45 +00:00