Skip to content

Commit 33c22f7

Browse files
committed
fix: remove configurable memory optimization settings as requested
- Remove useOnDiskStorage, memoryMapThreshold, and hnswEfSearch from CodeIndexConfig - Remove same fields from PreviousConfigSnapshot type - Remove unused QdrantMemoryOptimizationConfig import and interface - Update comment in service-factory.ts for clarity - Add documentation to clarify QDRANT_QUANTIZATION_CONFIG_DEFAULTS is for search operations Memory optimizations are now always enabled via constants as originally requested.
1 parent c519495 commit 33c22f7

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

packages/types/src/qdrant.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ export const QDRANT_OPTIMIZER_CONFIG_DEFAULTS = {
101101
} as const
102102

103103
/**
104-
* Quantization configuration for additional memory efficiency
104+
* Quantization configuration for search operations
105+
* These settings are applied during vector search queries to balance memory efficiency and search quality
105106
*/
106107
export const QDRANT_QUANTIZATION_CONFIG_DEFAULTS = {
107108
/**
@@ -119,23 +120,3 @@ export const QDRANT_QUANTIZATION_CONFIG_DEFAULTS = {
119120
*/
120121
OVERSAMPLING: 2.0,
121122
} as const
122-
123-
/**
124-
* Memory optimization configuration interface
125-
*/
126-
export interface QdrantMemoryOptimizationConfig {
127-
/**
128-
* Enable on-disk storage for vectors and indexes
129-
*/
130-
useOnDiskStorage?: boolean
131-
132-
/**
133-
* Number of vectors before using memory-mapped files
134-
*/
135-
memoryMapThreshold?: number
136-
137-
/**
138-
* HNSW search parameter (ef) - controls search quality vs memory usage
139-
*/
140-
hnswEfSearch?: number
141-
}

src/services/code-index/interfaces/config.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ApiHandlerOptions } from "../../../shared/api" // Adjust path if needed
22
import { EmbedderProvider } from "./manager"
3-
import { QdrantMemoryOptimizationConfig } from "@roo-code/types"
43

54
/**
65
* Configuration state for the code indexing feature
@@ -19,10 +18,6 @@ export interface CodeIndexConfig {
1918
qdrantApiKey?: string
2019
searchMinScore?: number
2120
searchMaxResults?: number
22-
// Memory optimization settings
23-
useOnDiskStorage?: boolean
24-
memoryMapThreshold?: number
25-
hnswEfSearch?: number
2621
}
2722

2823
/**
@@ -42,8 +37,4 @@ export type PreviousConfigSnapshot = {
4237
mistralApiKey?: string
4338
qdrantUrl?: string
4439
qdrantApiKey?: string
45-
// Memory optimization settings
46-
useOnDiskStorage?: boolean
47-
memoryMapThreshold?: number
48-
hnswEfSearch?: number
4940
}

src/services/code-index/service-factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class CodeIndexServiceFactory {
136136
throw new Error(t("embeddings:serviceFactory.qdrantUrlMissing"))
137137
}
138138

139-
// Create QdrantVectorStore with memory optimization always enabled
139+
// Create QdrantVectorStore (memory optimization is always enabled via constants)
140140
return new QdrantVectorStore(this.workspacePath, config.qdrantUrl, vectorSize, config.qdrantApiKey)
141141
}
142142

0 commit comments

Comments
 (0)