Skip to content
Canopy is in pre-release. These docs describe the product at its public launch — commands, tool names, and integration examples reflect what you'll see once binaries ship. Join the waitlist →

Slow Indexing

  • canopy index takes more than 2-3 minutes for a typical codebase.
  • Progress appears to stall with no output for long periods.
  • The embedding phase (built by default) takes considerably longer than the AST and search phases.

For reference, the Pith monorepo (622 TypeScript/Rust source files) indexes in approximately 2.6 seconds for an incremental run. A full re-index from scratch takes under 10 seconds on modern hardware.


CauseIndicator
Large repository with many filescanopy index --list-ignored reports > 50,000 files to index
Binary and generated files being indexedUnusual file types in index
No .gitignore in the repositoryNo automatic exclusions
--full flag used unnecessarilyWipes and rebuilds entire index
Embedding generation (on by default)Slow or unreachable Ollama
First-time embedding model downloadDownloading nomic-embed-text (~270 MB)

Step 1: Check how many files would be indexed

Section titled “Step 1: Check how many files would be indexed”
Terminal window
canopy index . --list-ignored

This walks the repo and prints what would be indexed vs skipped (grouped by top-level directory) without indexing anything. If the would index count is unexpectedly high (tens of thousands), proceed to Step 2.

Create or edit <repo>/.canopyignore (gitignore syntax):

dist/
build/
.next/
coverage/
node_modules/
vendor/
generated/
__pycache__/
target/
.cache/
*.min.js
*.bundle.js

Canopy already respects .gitignore automatically, plus a bundled default ignore set (node_modules/, build artifacts, and similar). Use .canopyignore for directories that exist in your repo but are not in .gitignore. One-off exclusions can also be passed on the command line with --ignore-pattern '<glob>'.

After adding exclusions, run a full re-index to apply them:

Terminal window
canopy index . --full

Step 3: Use incremental indexing for subsequent runs

Section titled “Step 3: Use incremental indexing for subsequent runs”

After the initial full index, subsequent runs should be incremental (the default):

Terminal window
canopy index .

Only files modified since the last index are re-processed. Reserve --full for when you suspect the index is stale or corrupt.

Embeddings are built by default. If the embedding phase is slow, check your Ollama server:

Terminal window
curl http://localhost:11434/api/tags

If Ollama is not running, start it:

Terminal window
ollama serve

The AST index and keyword search work without embeddings — only semantic search requires them, and embedding failure is never fatal. To skip the embedding phase and get a keyword-only index:

Terminal window
canopy index . --no-embeddings

Re-run canopy index . later to add the embeddings.

Step 5: Pre-provision the embedding runtime

Section titled “Step 5: Pre-provision the embedding runtime”

If the first indexing run is slow due to model download, provision the embedding backend once up front:

Terminal window
canopy setup --only embedding

This installs Ollama and the embedding model. Subsequent indexing runs skip the download.

Git commit history is ingested automatically whenever a .git/ directory is present, capped at 1000 commits by default. On repos with very deep history, tune or skip it:

Terminal window
# Ingest fewer commits
canopy index . --max-commits 200
# Skip git ingestion entirely
canopy index . --no-git

Contact support at support@gulfshieldtech.com if:

  • Indexing a codebase of fewer than 10,000 source files takes more than 5 minutes with embeddings disabled.
  • canopy index --list-ignored shows significantly fewer files than expected (the index may be silently skipping files).

Include the output of:

Terminal window
canopy index . --log-level debug 2>canopy-debug.log
canopy doctor --repo .

Attach canopy-debug.log to your support request.