| Query | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | MCP speedup |
|---|---|---|---|---|---|---|
| File tree | 0.04 ms | 52.9 ms | · | · | · | 1,253x vs CLI |
Symbol search (init) | 0.10 ms | 54.1 ms | 3.2 ms | 6.3 ms | 6.5 ms | 549x vs CLI |
Full-text search (allocator) | 0.05 ms | 60.7 ms | 3.2 ms | 5.3 ms | 6.6 ms | 1,340x vs CLI |
Word index (self) | 0.04 ms | 59.7 ms | n/a | 7.2 ms | 6.5 ms | 1,404x vs CLI |
| Structural outline | 0.05 ms | 53.5 ms | 3.1 ms | · | 2.4 ms | 1,143x vs CLI |
| Dependency graph | 0.05 ms | 2.2 ms | n/a | n/a | n/a | 45x vs CLI |
| Query | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | MCP speedup |
|---|---|---|---|---|---|---|
| File tree | 0.05 ms | 54.0 ms | · | · | · | 1,173x vs CLI |
Symbol search (init) | 0.07 ms | 54.4 ms | 3.4 ms | 6.3 ms | 3.6 ms | 758x vs CLI |
Full-text search (allocator) | 0.03 ms | 54.1 ms | 2.9 ms | 5.1 ms | 3.7 ms | 1,554x vs CLI |
Word index (self) | 0.04 ms | 54.7 ms | n/a | 6.3 ms | 4.2 ms | 1,518x vs CLI |
| Structural outline | 0.04 ms | 54.9 ms | 3.4 ms | · | 2.5 ms | 1,243x vs CLI |
| Dependency graph | 0.05 ms | 1.9 ms | n/a | n/a | n/a | 41x vs CLI |
| Repo | codedb MCP | ripgrep / grep | Reduction |
|---|---|---|---|
codedb (search allocator) | ~20 tokens | ~32,564 tokens | 1,628x fewer |
merjs (search allocator) | ~20 tokens | ~4,007 tokens | 200x fewer |
| Repo | Files | Lines | Cold start | Per file |
|---|---|---|---|---|
| codedb | 20 | 12.6k | 17 ms | 0.85 ms |
| merjs | 100 | 17.3k | 16 ms | 0.16 ms |
| openclaw/openclaw | 11,281 | 2.29M | 75 s | 6.66 ms |
| vitessio/vitess | 5,028 | 2.18M | 50 s | 9.95 ms |
| Feature | codedb MCP | codedb CLI | ast-grep | ripgrep | grep | ctags |
|---|---|---|---|---|---|---|
| Structural parsing | Yes | Yes | Yes | No | No | Yes |
| Trigram search index | Yes | Yes | No | No | No | No |
| Inverted word index | Yes | Yes | No | No | No | No |
| Dependency graph | Yes | Yes | No | No | No | No |
| Version tracking | Yes | Yes | No | No | No | No |
| Multi-agent locking | Yes | Yes | No | No | No | No |
| Pre-indexed (warm) | Yes | No | No | No | No | No |
| MCP protocol | Yes | No | No | No | No | No |
| Full-text search | Yes | Yes | Yes | Yes | Yes | No |
| Atomic file edits | Yes | Yes | Yes | No | No | No |
| File watcher | Yes | Yes | No | No | No | No |
Indexes once on startup. All queries hit in-memory data structures with O(1) hash lookups. No filesystem access at query time.
~55ms process startup + full filesystem scan on every invocation. Even simple queries pay the full cost.
Re-parses all files through tree-sitter on every call. ~3ms for small repos, scales linearly with codebase size.
Brute-force scans every file on every call. ~5-7ms for small repos. No structural understanding, no index.