mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
perf(files): skip unused Quick Open byte accounting (#20216)
Co-authored-by: Orca Worker <orca-worker@localhost>
This commit is contained in:
@@ -132,12 +132,14 @@ export async function listQuickOpenFiles(
|
||||
if (maxResults !== undefined && files.size >= maxResults) {
|
||||
return true
|
||||
}
|
||||
const nextBytes = serializedQuickOpenPathBytes(relPath) + (files.size === 0 ? 0 : 1)
|
||||
if (maxSerializedBytes !== undefined && serializedBytes + nextBytes > maxSerializedBytes) {
|
||||
return true
|
||||
if (maxSerializedBytes !== undefined) {
|
||||
const nextBytes = serializedQuickOpenPathBytes(relPath) + (files.size === 0 ? 0 : 1)
|
||||
if (serializedBytes + nextBytes > maxSerializedBytes) {
|
||||
return true
|
||||
}
|
||||
serializedBytes += nextBytes
|
||||
}
|
||||
files.add(relPath)
|
||||
serializedBytes += nextBytes
|
||||
return maxResults !== undefined && files.size >= maxResults
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user