MacOS - Performance - hotfix
Major performance improvements for large datasets (40K+ nodes):
[1.0.3-hotfix] - 2025-12-09
Fixed
- Critical: Double .gguf Extension Bug - Model names with
.ggufextension (e.g.,bge-m3.gguf) were having.ggufappended again, resulting inbge-m3.gguf.ggufand "model not found" errors- Fixed in
pkg/heimdall/scheduler.go- Now checksstrings.HasSuffix()before adding extension - Fixed in
pkg/embed/local_gguf.go- Same fix for embedding model resolution - This prevented both Heimdall AI assistant and auto-embeddings from working on macOS
- Fixed in
- Missing LaunchAgent Environment Variables - macOS menu bar app's LaunchAgent plist was missing critical env vars
- Added
NORNICDB_MODELS_DIR=/usr/local/var/nornicdb/models - Added
NORNICDB_HEIMDALL_MODELto pass model name to Heimdall - Added
NORNICDB_EMBEDDING_MODELto pass model name to embeddings - Updated both plist generators in
macos/MenuBarApp/NornicDBMenuBar.swift
- Added
- macOS Models Path Resolution - Added
/usr/local/var/nornicdb/modelsas first candidate in Heimdall's model path resolution (was only checking Docker paths) - Swift YAML Config Indentation - Fixed multi-line string indentation errors in plist generation
Changed
- Non-blocking Regenerate Embeddings -
POST /nornicdb/embed/trigger?regenerate=truenow returns202 Acceptedimmediately- Clearing and regeneration happens asynchronously in background goroutine
- Prevents UI from blocking for minutes during large regenerations
- Added detailed logging for background operations
- UI Confirmation Dialog - Added confirmation modal before regenerating all embeddings
- Shows warning about destructive operation
- Displays current embedding count
- Red warning styling to indicate danger
Added
- Swift YAML Parser Unit Test - Created
macos/MenuBarApp/ConfigParserTest.swiftto verify config loading works correctly- Tests section extraction, boolean parsing, string parsing
- Validates against actual
~/.nornicdb/config.yamlfile
STREAMING OPTIMIZATION:
- Added StreamingEngine interface implementation to AsyncEngine and WALEngine
- MATCH (n) RETURN n LIMIT X queries now use early termination
- Full storage chain streaming: AsyncEngine → WALEngine → BadgerEngine
- 100x+ faster LIMIT queries (stops at limit instead of loading all nodes)
O(1) STATS LOOKUPS:
- NodeCount() and EdgeCount() now return cached atomic counters
- Eliminates O(N) full table scans for status/stats endpoints
- COUNT(n) fast-path for simple node count queries
STORAGE EVENT SYSTEM:
- Added StorageEventNotifier interface with 6 event callbacks
- Node/Edge create, update, delete events fire from BadgerEngine
- Search indexes automatically synchronized via event subscriptions
BUG FIXES:
- Fixed UpdateNode upsert not incrementing node count
- Fixed WAL test race condition with .tmp snapshot files
- Fixed SKIP+LIMIT interaction with streaming optimization
Breaking: None
Migration: None required - drop-in replacement"