GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — stream: pre-allocate _events by ronag · Pull Request #50428 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will continue the review tomorrow night, but one general note, I think you should avoid deleting those events when removing listener, and IIRC I think we use the number of keys exists in order to see how many events we listen to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1466/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
54755f2 to
4e46fdf
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
cc6dfe0 to
89ad099
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
673f925 to
507478e
Compare
There was an error while loading. Please reload this page.
| else | ||
| delete events[type]; | ||
| } | ||
| this[kShapeMode] = false; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why? What if we just have an object template (template in the abstract way not v8 one) and use that when resetting? (Same for the one below)
(This is not really important comment as it's not happening on a regular basis)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't understand
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe reset _events to the template you provided (e.g. with data event key) instead to the default one (i.e. empty with proto null)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That would require us to keep the template in memory and then create copies. Maybe having some kind of reset/initEvents override is better but starts to make things complciated.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!(this instanceof Duplex)) | ||
| return new Duplex(options); | ||
|
|
||
| this._events ??= { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't really think we should modify the private property _events like that, maybe have an option or an api for setting events template in the EventEmitter class?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Follow up PR welcome?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 2aaa21f |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
No longer necessary given recent stream and event optimziations. Refs: nodejs#50428 Refs: nodejs#50439 PR-URL: nodejs#50440
PR-URL: #50428 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50428 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50428 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
|
This seems to have broken the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Refs: #50428 PR-URL: #51925 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Refs: #50428 PR-URL: #51925 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Refs: #50428 PR-URL: #51925 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.