09cb08e5c7
consumeMetadata() was looping ALL notes in cache (O(N)) to find notes by the author whose metadata changed. With hundreds of cached notes, this caused lag on every metadata event. Added notesByAuthor index (ConcurrentHashMap<HexKey, MutableSet<Note>>) populated at loadEvent time. consumeMetadata now looks up notes by author in O(1) instead of scanning the entire cache. Before: ~500 notes × per metadata event = lag After: ~3 notes per author × per metadata event = instant Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>