| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I'm not convinced we should do this. The persistent marks and measures were removed to avoid the Very Likely chance that they would become a memory leak in server code. If the user is not very careful about clearing those, it'll become a problem very quickly. |
Sorry, something went wrong.
I'm confused about this statement. The marks are always persistent either with the change of #37136, and users should clear them with Performance.clearMarks in Node.js already. Regarding the spec, the APIs are designed to be used with clearMarks and clearMeasures. So I do not get your point of memory leaks problem. If that is a problem, then that is already a real problem but not introduced in this PR. |
Sorry, something went wrong.
The marks are stored, yes, using as little memory as possible. The associated PerformanceEntry objects are not, and that's what I'm referring to as a potential memory leak here. Currently, the longest time we queue up the PerformanceEntry objects is a single event loop turn while they are collected before they are emitted to the PerformanceObserver. It's a potential footgun if people aren't aware (keep in mind that users may not even know that they need to call clearMarks() if a buggy dependency is filling up the queue. Perhaps we could add a process.emitWarning() in here if the queue grows past a given threshhold? |
Sorry, something went wrong.
This sounds pretty good! I'll do an update. |
Sorry, something went wrong.
Sorry, something went wrong.
All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after #37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in nodejs/diagnostics#464 (comment) could also be fixed. PR-URL: #39297 Reviewed-By: James M Snell <jasnell@gmail.com>
|
this seems semver-minor? |
Sorry, something went wrong.
Yeah, it doesn't introduce breaking changes to the v16.x line. But it depends on #37136 and changed various API semantics (compared to v12.x and v14.x) to be compliant with web specs, it should not be landed on v12.x and v14.x. |
Sorry, something went wrong.
All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after #37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in nodejs/diagnostics#464 (comment) could also be fixed. PR-URL: #39297 Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: build: * (SEMVER-MINOR) reset embedder string to "-node.0" (Michaël Zasso) #39470 deps: * (SEMVER-MINOR) restore minimum ICU version to 68 (Michaël Zasso) #39470 * (SEMVER-MINOR) make V8 9.2 abi-compatible with 9.0 (Michaël Zasso) #39470 * (SEMVER-MINOR) update V8 to 9.2.230.21 (Michaël Zasso) #39470 inspector: * mark as stable (Gireesh Punathil) #37748 perf_hooks: * (SEMVER-MINOR) web performance timeline compliance (legendecas) #39297 punycode: * add pending deprecation (Antoine du Hamel) #38444 repl: * (SEMVER-MINOR) enable --experimental-repl-await /w opt-out (hemanth.hm) #34733 PR-URL: TODO
The option buffered is not about queueing the PerformanceEntrys with an event loop task or not. The option buffered in the spec is about filling the observer with the global PerformanceEntry buffer. The current (and the spec) behavior is different with Node.js version <= v16.0.0. PR-URL: #39514 Refs: https://w3c.github.io/performance-timeline/#observe-method Refs: https://nodejs.org/dist/latest-v14.x/docs/api/perf_hooks.html#perf_hooks_performanceobserver_observe_options Refs: #39297 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after #37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in nodejs/diagnostics#464 (comment) could also be fixed. PR-URL: #39297 Reviewed-By: James M Snell <jasnell@gmail.com>
This is a security release. Notable Changes: - CVE-2021-22930: Use after free on close http2 on stream canceling (High) [#39423](#39423) - (SEMVER-MINOR) deps: update V8 to 9.2.230.21 (Michaël Zasso) [#39470](#39470) - inspector: mark as stable (Gireesh Punathil) [#37748](#37748) - (SEMVER-MINOR) perf_hooks: web performance timeline compliance (legendecas) [#39297](#39297) - punycode: add pending deprecation (Antoine du Hamel) [#38444](#38444) - (SEMVER-MINOR) repl: enable --experimental-repl-await /w opt-out (hemanth.hm) [#34733](#34733) PR-URL: #39534
|
This seemed to cause a test failure with radium that was surfaced when running CITGM on v16.6.0 - see #39534 (comment). |
Sorry, something went wrong.
#39532 is supposed to fix the issue. |
Sorry, something went wrong.
The option buffered is not about queueing the PerformanceEntrys with an event loop task or not. The option buffered in the spec is about filling the observer with the global PerformanceEntry buffer. The current (and the spec) behavior is different with Node.js version <= v16.0.0. PR-URL: #39514 Refs: https://w3c.github.io/performance-timeline/#observe-method Refs: https://nodejs.org/dist/latest-v14.x/docs/api/perf_hooks.html#perf_hooks_performanceobserver_observe_options Refs: #39297 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after #37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in nodejs/diagnostics#464 (comment) could also be fixed. PR-URL: #39297 Reviewed-By: James M Snell <jasnell@gmail.com>
The option buffered is not about queueing the PerformanceEntrys with an event loop task or not. The option buffered in the spec is about filling the observer with the global PerformanceEntry buffer. The current (and the spec) behavior is different with Node.js version <= v16.0.0. PR-URL: #39514 Refs: https://w3c.github.io/performance-timeline/#observe-method Refs: https://nodejs.org/dist/latest-v14.x/docs/api/perf_hooks.html#perf_hooks_performanceobserver_observe_options Refs: #39297 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
| Back | FazBrowse Home | New Git URL |
All API introduced in this PR are compliant with web performance-timeline spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis.
Changes summary:
With the new ability to fetch user-created performance entries synchronously, I believe issues raised in nodejs/diagnostics#464 (comment) could also be fixed.
Performance comparison: