Skip to content

Commit 3630e0e

Browse files
adriencacciaart049
authored andcommitted
perf: warmup V8 symbols generation of the performance map
1 parent 38de55d commit 3630e0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export const initCore = () => {
7171

7272
export const optimizeFunction = async (fn: CallableFunction) => {
7373
if (skipOptimization) {
74+
// warmup V8 symbols generation of the performance map
75+
await fn();
7476
return;
7577
}
7678
// Source: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#optimization-killers
@@ -82,6 +84,8 @@ export const optimizeFunction = async (fn: CallableFunction) => {
8284

8385
export const optimizeFunctionSync = (fn: CallableFunction) => {
8486
if (skipOptimization) {
87+
// warmup V8 symbols generation of the performance map
88+
fn();
8589
return;
8690
}
8791
// Source: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#optimization-killers

0 commit comments

Comments
 (0)