mirror of https://github.com/nodejs/node.git
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>pull/50258/head
parent
b3313bf03f
commit
340b9a827b
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue