continuedev / continuedev/continue

[Best Practices Violation] Do not hard-code an embeddings file batch size

Open
#3,979 1 comment 0 reactions 1 assignee View on GitHub

@RomneyDa is already working on this.

Since Feb 5, 2025.

area:indexing kind:enhancement needs-triage
Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Validations
  • I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • I'm not able to find an open issue that requests the same enhancement
Problem

https://github.com/continuedev/continue/blob/f29e1849f3169b7dc8f9586f0b258dd82626a3c8/core/indexing/CodebaseIndexer.ts#L34-L40

The above code sets a hard-coded limit on the number of batched files processed by the Continue extension. There is no way to see this number or to override it by the end-user.

This has a secondary impact on what's shown to the end user while embeddings are being calculated. Confusingly, the progress bar seems to be operating off a different number? Or maybe it isn't at all.

Image

That string is actually built in a completely different place:

https://github.com/continuedev/continue/blob/f29e1849f3169b7dc8f9586f0b258dd82626a3c8/core/indexing/LanceDbIndex.ts#L300-L306

Whereas the progress bar is built here:

https://github.com/continuedev/continue/blob/f29e1849f3169b7dc8f9586f0b258dd82626a3c8/core/indexing/CodebaseIndexer.ts#L418-L423

which is then used below to calculate progress percentage:

https://github.com/continuedev/continue/blob/f29e1849f3169b7dc8f9586f0b258dd82626a3c8/core/indexing/CodebaseIndexer.ts#L445-L448

Solution
  • Make it user configurable.
  • In the UI, change the phrase "Computing embeddings for X files" such that X is totalOps instead of LanceDb.results.compute.length, which at that point is actually being called from within a batch

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.