perf(files): skip unused Quick Open byte accounting (#20216)

Co-authored-by: Orca Worker <orca-worker@localhost>
This commit is contained in:
OrcaWin
2026-09-12 18:02:46 -07:00
committed by GitHub
co-authored by Orca Worker
parent 9d62426535
commit 04b4a0e4be
+6 -4
View File
@@ -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
}