fix: improve code indexing performance on low-end hardware (#8875) #8876
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR attempts to address Issue #8875 by making code indexing concurrency parameters configurable and adding a low resource mode for better performance on modest hardware.
Problem
Users with low-end hardware (4-core CPUs, 8GB RAM) experience extremely slow and unstable code indexing, with the UI becoming unresponsive and indexing often failing to complete.
Solution
This implementation provides configurable concurrency parameters and a low resource mode that significantly reduces resource usage:
New Configuration Settings
roo-cline.codeIndex.parsingConcurrency: Maximum files parsed concurrently (default: 10, low resource: 2)roo-cline.codeIndex.batchProcessingConcurrency: Maximum embedding batches processed concurrently (default: 10, low resource: 2)roo-cline.codeIndex.maxPendingBatches: Maximum pending batches before throttling (default: 20, low resource: 5)roo-cline.codeIndex.fileProcessingConcurrency: Maximum files processed in file watcher (default: 10, low resource: 2)roo-cline.codeIndex.lowResourceMode: Toggle to enable low resource modeLow Resource Mode
When enabled, automatically applies reduced defaults:
Implementation Details
Testing
Notes for Users
Future Improvements
Feedback and guidance are welcome!
Closes #8875
Important
Adds configurable concurrency settings and a low resource mode to improve code indexing performance on low-end hardware.
package.jsonfor code indexing, includingparsingConcurrency,batchProcessingConcurrency,maxPendingBatches, andfileProcessingConcurrency.lowResourceModesetting to automatically apply reduced defaults for low-end hardware.constants/index.tsto define normal and low resource mode defaults for concurrency settings.file-watcher.tsandscanner.tsto apply configurable settings and handle low resource mode.service-factory.tsto create instances with new settings, ensuring fallback handling in test environments.package.nls.jsonwith descriptions for new settings.This description was created by
for 8b72f5a. You can customize this summary. It will automatically update as commits are pushed.