Andreas Madsen
Andreas Madsen
@refack what are the outliers?
@refack I have made a long comment in the other issue (https://github.com/nodejs/node/pull/16888#issuecomment-343434492), hopefully that will clarify things.
Specifically, regarding `PromiseHooks` and performance I would like to see: **`kDestroy` is added.** I think in many cases it is straightforward to know when a `promise` can no longer be...
> Do you have a suggestion/intuition here how to do that? Often promises are only "referenced" once, either by `.then()` chaining or they are returned and used in `await`. At...
> This seems surprising to me. I would think that calling out to the javascript hook defined by the user from C++ to be the most expensive part. Have you...
> The thing with promise hooks (as required by async_hooks) is that we need to pass the JSPromise object to Node, which immediately makes all escape analysis useless as TurboFan...
@bmeurer yes we do. If `PromiseHooks` allowed us to set those ids (just one 64bit id really) in `kInit` and then passed them to the other events we wouldn't need...
> Would it be possible to eliminate the need to pass a concrete JSPromise object to the promise hooks completely? This is what I'm saying! We are only using it...
> Staring at the `PromiseHook` on the Node side, you store the `PromiseWrap` object on the `JSPromise` and you do check the parent `JSPromise` during `kInit`. Correct. The `PromiseWrap` holds...
@bmeurer By bluebird, do you mean with https://github.com/petkaantonov/bluebird/pull/1472 applied?