Skip to content

Commit 720d714

Browse files
H4adalexfernandez
authored andcommitted
doc: add ReflectConstruct to known perf issues
PR-URL: nodejs#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>
1 parent ea2e097 commit 720d714

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/contributing/primordials.md

+3
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ performance of code in Node.js.
122122
* `SafePromiseAny`
123123
* `SafePromiseRace`
124124
* `SafePromisePrototypeFinally`: use `try {} finally {}` block instead.
125+
* `ReflectConstruct`: Also affects `Reflect.construct`.
126+
`ReflectConstruct` creates new types of classes inside functions.
127+
Instead consider creating a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109).
125128

126129
In general, when sending or reviewing a PR that makes changes in a hot code
127130
path, use extra caution and run extensive benchmarks.

0 commit comments

Comments
 (0)