-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Reduce scheduler serialization overhead #14249
Conversation
In the process of switching to MessageChannel, it seems the postMessage call was modified to pass `"*"` (originally the target origin value from `window.postMessage`). This actually ends up triggering serialization, whereas passing `undefined` bypasses. To save some investigation, passing a Number like `0` still incurs serialization overhead - `undefined` has special behavior.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
what about passing zero arguments? |
|
What about I'll go ahead and merge, though. Thanks Jason! |
I admit I hadn't had time to check |
I didn’t think IsEmpty would return true for undefined; was this observably faster? |
@developit For the formality, mind asking to be added to our CLA? |
Yup, working on it! @sophiebits yes - consistently 5x faster. I'll set up a proper benchmark. |
:o |
Update on the CLA - I was told to just sign as an individual, which I've just done. |
In the process of switching to MessageChannel, it seems the postMessage call was modified to pass `"*"` (originally the target origin value from `window.postMessage`). This actually ends up triggering serialization, whereas passing `undefined` bypasses. To save some investigation, passing a Number like `0` still incurs serialization overhead - `undefined` has special behavior.
In the process of switching to MessageChannel, it seems the postMessage call was modified to pass `"*"` (originally the target origin value from `window.postMessage`). This actually ends up triggering serialization, whereas passing `undefined` bypasses. To save some investigation, passing a Number like `0` still incurs serialization overhead - `undefined` has special behavior.
In the process of switching to
MessageChannel
, it seems the postMessage call was modified to pass"*"
(originally the target origin value fromwindow.postMessage
). This actually ends up triggering serialization, whereas passingundefined
bypasses.To save some investigation, passing a Number like
0
still incurs serialization overhead -undefined
has special behavior.