-
Notifications
You must be signed in to change notification settings - Fork 72
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 unnecessary memory retention paths #1232
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New rule added to head canon: Law of the Conservation of Event Handles: every on must be balanced by an equal but opposite off.
It's preferable. @erights I'll wait for you to review the v8 Error taming changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the writer.js changes, I have never used .on
or .off
but see they are inherited from EventEmitter
, which is fine since this whole file is Node specific. But is the problem Node specific? Should we have some Writer-level cleanup that applies to all Writers, as opposed to just Writables?
@erights the cleanup for iterator based streams is to use In this PR, I think the more meaningful change is to the v8 error stack taming. |
@erights PTAL, I decided to redo the logic to make clear we either have a raw structured stack trace or a parsed string. |
8ef8143
to
1f8563a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New unified map is better. LGTM
After the stack string is generated, discard the structured stack objects
1f8563a
to
ec4d8fc
Compare
While investigating Agoric/agoric-sdk#5447, I found that endo was possibly unnecessarily holding onto memory in a couple places. This PR fixes them: