mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: add ReflectConstruct to known perf issues
PR-URL: https://github.com/nodejs/node/pull/50111 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
1 parent
dd66fdfb7b
commit
dacee4d9b5
1 file changed
+3
@@ -122,6 +122,9 @@ performance of code in Node.js.
|
||||
* `SafePromiseAny`
|
||||
* `SafePromiseRace`
|
||||
* `SafePromisePrototypeFinally`: use `try {} finally {}` block instead.
|
||||
* `ReflectConstruct`: Also affects `Reflect.construct`.
|
||||
`ReflectConstruct` creates new types of classes inside functions.
|
||||
Instead consider creating a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109).
|
||||
|
||||
In general, when sending or reviewing a PR that makes changes in a hot code
|
||||
path, use extra caution and run extensive benchmarks.
|
||||
|
||||
Reference in new issue
Block a user