Reproduction:
git clone https://github.com/microsoft/playwright && cd playwright
npm ci
npx esbuild --log-level=verbose "packages/playwright-core/src/**/*.ts" --outdir=packages/playwright-core/lib --sourcemap=linked --watch=true --platform=node --format=cjs
- Go to
packages/playwright-core/src/client/page.ts and modify the file header 20 times, between each time save the file and look at the memory consumption.
This can be used as well:
import fs from "fs"
for (let i = 0; i < 100; i++) {
fs.appendFileSync("packages/playwright-core/src/client/page.ts", "\n")
await new Promise((resolve) => setTimeout(resolve, 50))
}
and aborted after a few seconds.
Expected: It stays around 50-200 MB
Actual: It grows up to 10-40 GB
Version: 0.25.0 - also tested with 0.25.2
I was able to reproduce on macOS and Linux (Ubuntu amd64).
Reproduction:
git clone https://github.com/microsoft/playwright && cd playwrightnpm cinpx esbuild --log-level=verbose "packages/playwright-core/src/**/*.ts" --outdir=packages/playwright-core/lib --sourcemap=linked --watch=true --platform=node --format=cjspackages/playwright-core/src/client/page.tsand modify the file header 20 times, between each time save the file and look at the memory consumption.This can be used as well:
and aborted after a few seconds.
Expected: It stays around 50-200 MB
Actual: It grows up to 10-40 GB
Version: 0.25.0 - also tested with 0.25.2
I was able to reproduce on macOS and Linux (Ubuntu amd64).