Skip to content

Commit bb1da9c

Browse files
committed
Explain why we need to stream and why not use readline
1 parent 2cde3b9 commit bb1da9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

extensions/ql-vscode/src/common/jsonl-reader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export async function readJsonlFile<T>(
1515
handler: (value: T) => Promise<void>,
1616
logger?: { log: (message: string) => void },
1717
): Promise<void> {
18+
// Stream the data as large evaluator logs won't fit in memory.
19+
// Also avoid using 'readline' as it is slower than our manual line splitting.
1820
void logger?.log(
1921
`Parsing ${path} (${(await stat(path)).size / 1024 / 1024} MB)...`,
2022
);

0 commit comments

Comments
 (0)