Open thedavidprice opened 2 years ago
EDIT: Moved to #4569
Just realised I was supposed to put details in https://github.com/redwoodjs/redwood/issues/4356 (Closed now). This issue is related to api. Moving my comment to a separate issue.
Brb downloading more RAM
Background
Originally reported by @zygopleural here:
4208
Web memory leak resolved and API memory leak mitigated via:
4096
Because the API memory leak is not fully resolved, we want to benchmark and watch performance as well as keep this issue open for further work toward complete resolution.
This Issue uses the original reproduction with the new benchmarks.
related benchmark issue #4356
Expected behaviour
yarn redwood test
should use ~ same heap size for each test unless the user has specifically done something wrong.i.e. the heap size should not increase with each consecutive test or run (i.e. leak)
What currently happens
rw test web
: The heap size is stablerw test api
: Even after mitigation in #4096 the heap size increases along with quantity of testsSteps to reproduce
Option 1: Clone the Reproduction Repo
Option 2. Create new app and run commands
1. Creat App
yarn create redwood-app --typescript test
2. Add some models to
./api/db/schema.prisma
Excuse the silly models, just something quick to generate tests.
3. Generate some tests
4. Run tests
yarn redwood test --logHeapUsage
Benchmarks as of v0.44
Initial test (watch mode)
Second Run (watch
mode)
Third Run (watch mode)