When you connect to a collaborative workspace, your browser needs to sync its local Virtual File System (VFS) with the host. If a project has 10,000 files, doing a linear for loop to compare the timestamps or contents of every single file across a WebRTC data channel takes several seconds and completely chokes the network bandwidth.
NitroIDE completely eliminates this O(N) bottleneck. We modeled our Virtual File System using a Cryptographic Merkle Tree—the exact same data structure used by Git and blockchain ledgers to verify data integrity instantly.
In a Merkle Tree, every file is hashed (using SHA-256). Every directory is then assigned a hash based on the combination of the files inside it. Finally, the root of your project gets a single "Root Hash." When two browsers connect, they don't compare 10,000 files; they just compare their Root Hashes. If the hashes match, the VFS is perfectly synced in O(1) time.
Logarithmic Traversal: If the Root Hashes differ, the algorithm travels down the tree, comparing branch hashes. It ignores 99% of the file system and immediately pinpoints the exact nested folder and single file that changed, requiring only log(N) network requests to synchronize a massive mono-repo.
These Merkle hashes are heavily cached in IndexedDB. Whenever a developer types a character and saves a file, NitroIDE only recalculates the hash for that specific file and its parent directories bubbling up to the root. This guarantees that your 10,000-file project is always ready to sync in under 5 milliseconds.
Connect a peer to your workspace and watch the Merkle Tree synchronize 10,000 files instantly.
Launch Collaborative IDE