perf(addon-search): cache lowercased line text in line cache
Lazily store a lowercased line variant in the line cache entry to avoid repeated toLowerCase calls during case-insensitive searches. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,7 +15,11 @@ export type LineCacheEntry = [
|
||||
/**
|
||||
* The offsets where each line starts when the entry describes a wrapped line.
|
||||
*/
|
||||
lineOffsets: number[]
|
||||
lineOffsets: number[],
|
||||
/**
|
||||
* Lowercased line text for case-insensitive searches, lazily populated.
|
||||
*/
|
||||
lineAsLower?: string
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user