test(tests): R4.3a browser re-measure of large files, leak series, WebKit repetition (stream sink, BYOB)
Streaming into FileBytes removes the file's JavaScript copy in Chromium and Firefox (50 MiB: 65 and 67 MiB summed growth against 56 and 79 for the TypeScript); WebKit keeps about 180 MiB for any file read inside a worker (272 against 76), a main-thread BYOB read feeding the worker's sink measured at 106. Corpus 666/678 on the stream path. Leak series (3 engines × 3 documents × 3 repetitions): Chromium ≤ 0.5 MiB over the last 5, Firefox within ±3 (idle only), WebKit copy +13 then level (12-import series −2.3). 20 dense imports in WebKit: no worker error event.
This commit is contained in:
1 parent
8924d50edf
commit
49591c53cd
14 files changed
+3002
-387
No files matched your search
@@ -3,6 +3,7 @@ import {
|
||||
mkdtempSync,
|
||||
readFileSync,
|
||||
rmdirSync,
|
||||
statSync,
|
||||
unlinkSync,
|
||||
writeFileSync,
|
||||
} from 'node:fs'
|
||||
@@ -75,6 +76,12 @@ export function importInputs(groups) {
|
||||
return { inputs, hostile }
|
||||
}
|
||||
|
||||
/** The bytes an input stands for: its size, or its description's length. */
|
||||
export function inputBytes(path) {
|
||||
if (!isGenerator(path)) return statSync(path).size
|
||||
return JSON.parse(readFileSync(path, 'utf8')).length
|
||||
}
|
||||
|
||||
/** A generator description becomes a temporary file, removed after the run. */
|
||||
export function materialise(input, scratch) {
|
||||
if (!isGenerator(input.path)) {
|
||||
|
||||
Reference in new issue
Block a user