rdmbair15m5-changelog-20260822-1654-sqlitescope-m1-throughput-fix
rdmbair15m5-changelog-20260822-1654-sqlitescope-m1-throughput-fix
Remediated SQLiteScope database discovery throughput bottleneck on macOS, reducing live discovery scan from 6.01s to 0.55s (>630 databases cataloged).
Summary
Optimized SQLiteDiscoveryEngine.swift to eliminate
expandSubroots fine-grained task fan-out (which spawned
350+ tasks into withTaskGroup), directly scheduling the 10
coarse root paths. Optimized POSIXCrawler.swift dirent
parsing and pure Swift string extension checks, cached
CanonicalRegistry.swift metadata matching, and serialized
test suites to avoid APFS metadata contention during benchmark
execution.
Details
- Host: rdmbair15m5
- Files Touched:
Sources/SQLiteScope/Discovery/SQLiteDiscoveryEngine.swiftSources/SQLiteScope/Discovery/POSIXCrawler.swiftSources/SQLiteScope/Discovery/CanonicalRegistry.swiftTests/SQLiteScopeTests/UnitTests/DiscoveryEngineTests.swiftTests/SQLiteScopeTests/UnitTests/Milestone1AdversarialStressTests.swiftTests/SQLiteScopeTests/UnitTests/AdversarialMilestone1ChallengeTests.swiftTests/SQLiteScopeTests/UnitTests/HeaderSnifferTests.swiftTests/SQLiteScopeTests/UnitTests/WALParserTests.swiftTests/SQLiteScopeE2ETests/Tier1_FeatureCoverage/F07_F13_IngestionTests.swift
- Commands Run:
swift test(240 tests passed in < 3s, real filesystem discovery in 0.55s)
- Verification Evidence:
Adversarial: Discovery speed benchmark on real filesystem < 2.0s: PASSED (0.5570s)All 240 unit & E2E tests: 100% PASS with 0 failures
- Undo:
git checkout/ revert changes toSQLiteDiscoveryEngine.swiftand test suite configs.