-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
PerformanceObserver callback always runs async #41259
Comments
erj826
changed the title
PerformanceObserver.oberver always buffers output
PerformanceObserver.oberver always runs async
Dec 21, 2021
erj826
changed the title
PerformanceObserver.oberver always runs async
PerformanceObserver callback always runs async
Dec 21, 2021
That's a documentation bug. This was changed fairly recently where the observer runs async. The doc change was just missed. |
Thanks James, I'll open a pr to update the docs. |
nodejs-github-bot
pushed a commit
that referenced
this issue
Dec 27, 2021
PR-URL: #41262 Refs: #41259 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Harshitha K P <[email protected]>
targos
pushed a commit
that referenced
this issue
Jan 14, 2022
PR-URL: #41262 Refs: #41259 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Harshitha K P <[email protected]>
danielleadams
pushed a commit
that referenced
this issue
Jan 31, 2022
PR-URL: #41262 Refs: #41259 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Harshitha K P <[email protected]>
Linkgoron
pushed a commit
to Linkgoron/node
that referenced
this issue
Jan 31, 2022
PR-URL: nodejs#41262 Refs: nodejs#41259 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Harshitha K P <[email protected]>
danielleadams
pushed a commit
that referenced
this issue
Feb 1, 2022
PR-URL: #41262 Refs: #41259 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Harshitha K P <[email protected]>
Hi, may I check what is the PR that introduces this behavior change to PerformanceObserver? I couldn't pinpoint it from the changelog. Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v16.13.1
Platform
Darwin ALT02923 19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
Run the perf_hooks code snippet documented here.
The above snippet outputs
hello, world
once. In node.js versions <16 it will outputhello, world
three times. The observer callback is never being called synchronously as the comment states it should be.How often does it reproduce? Is there a required condition?
Always for node 16 and greater.
What is the expected behavior?
The PerformanceObserver callback should be run for each
performance.mark()
call. The callback should be called synchronously and the list argument should contain one item on each call so long as the buffered option on the observe function is not set totrue
. As documented here.What do you see instead?
The PerformanceObserver callback is only run once after execution of the script.
Additional information
No response
The text was updated successfully, but these errors were encountered: