-
v6.0.2 Stable
released this
2025-11-20 18:55:31 +01:00 | 523 commits to main since this release⚡ v6.0.2 - Cloud Storage Performance Fix (10x Faster)
Critical performance improvement for ALL cloud storage adapters (GCS, S3, Azure, R2, OPFS)
The Problem
VFS file reads on cloud storage were 170x slower than filesystem:
- FileSystem: ~50ms ✅
- GCS/S3/Azure: ~17,000ms ❌
Root Cause
N+1 query pattern in relationship lookups:
getVerbsBySource_internal()fetched verbs one-by-onePathResolver.resolveChild()fetched children one-by-one- Path
/imports/data/file.txt= 60+ sequential API calls × 300ms = 17+ seconds
The Fix
Eliminated N+1 pattern using existing batch infrastructure:
readBatchWithInheritance()for verb fetching (2 parallel batch calls)brain.batchGet()for path resolution (1 batch call per level)- Zero external dependencies - uses Brainy's internal batching
Performance Impact
Storage Before After Improvement GCS 17,000ms 1,500ms 11x faster S3 17,000ms 1,500ms 11x faster Azure 17,000ms 1,500ms 11x faster R2 17,000ms 1,500ms 11x faster OPFS 3,000ms 300ms 10x faster FileSystem 200ms 50ms 4x faster Affected Operations
All VFS operations on cloud storage are now 10x faster:
- ✅
vfs.readFile(path) - ✅
vfs.readdir(path) - ✅
vfs.stat(path) - ✅
brain.getRelations()(high-degree nodes)
Migration
No code changes required - automatic 10x performance improvement!
Each storage adapter auto-optimizes based on its characteristics:
- GCS/Azure: 100 concurrent operations (HTTP/2 multiplexing)
- S3/R2: 1000 batch size (AWS batch APIs)
- FileSystem: 10 concurrent (OS file handle limits)
For Workshop Team
Update to v6.0.2 to fix the production GCS performance blocker:
npm install @soulcraft/brainy@6.0.2Expected improvement: VFS file reads drop from 17s → <2s 🚀
See CHANGELOG.md for full technical details.
Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.0.1...v6.0.2
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads