Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removes slow leak by emptying cache for source maps #895

Merged

Conversation

gabrielcsapo
Copy link
Contributor

@gabrielcsapo gabrielcsapo commented Jun 13, 2022

A faster fix for the slow memory leak explained in #894, but without depending on the vm to have source maps knowledge which is currently a bug.

Co-authored-by: Brenden Palmer <brendenpalmer@gmail.com>
Co-authored-by: Robert Jackson <rjackson@linkedin.com>
@rwjblue rwjblue added the bug label Jun 14, 2022
Comment on lines -4 to -6
Error.prepareStackTrace = function prepareStackTrace(error, stack) {
return error + stack.map(frame => '\n at ' + sourceMapSupport.wrapCallSite(frame)).join('');
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this is removed because source-map-support never uses the pre-existing Error.prepareStackTrace value (it always clobbers).

@rwjblue rwjblue merged commit aff74f6 into ember-fastboot:master Jun 15, 2022
@gabrielcsapo gabrielcsapo deleted the gabrielcsapo/empty-cache-stop-leak branch June 15, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants