typed-ember / ember-cli-typescript

Use TypeScript in your Ember.js apps!
https://docs.ember-cli-typescript.com
MIT License
363 stars 99 forks source link

memory leak of ts errors #1544

Closed patricklx closed 1 year ago

patricklx commented 1 year ago

there is a memory leak caused when processing errors. or rather when communicating with the typescript worker process.

ember-cli-typescript is using stagehand for communication, its saves al pending commands in a map, but never clears it. which means all error messages are retained. if you are migrating to typescript and have 1000 of errors, this quickly sums up and causes a heap oom.

https://github.com/dfreeman/stagehand/blob/master/src/command-coordinator.ts#L33

created an issue there too: https://github.com/dfreeman/stagehand/issues/8

dfreeman commented 1 year ago

Should be fixed in stagehand v1.0.1—users of ember-cli-typescript should get that update automatically the next time they refresh their dependencies. Thank you for reporting this, @patricklx!