mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Revert back to old tuning for reduced startup compile pressure
This commit is contained in:
parent
2dd5267098
commit
32d670d8dc
2 changed files with 16 additions and 16 deletions
|
|
@ -47,11 +47,12 @@ OptimizationInfo::initNormalOptimizationInfo()
|
||||||
scalarReplacement_ = true;
|
scalarReplacement_ = true;
|
||||||
smallFunctionMaxInlineDepth_ = 10;
|
smallFunctionMaxInlineDepth_ = 10;
|
||||||
compilerWarmUpThreshold_ = CompilerWarmupThreshold;
|
compilerWarmUpThreshold_ = CompilerWarmupThreshold;
|
||||||
// Start compiling tiny helper functions sooner. This is particularly
|
// Compile small helper functions somewhat sooner, but keep this conservative
|
||||||
// useful for jQuery-style code with many frequently-called short helpers.
|
// to avoid startup regressions on large script-heavy applications.
|
||||||
compilerSmallFunctionWarmUpThreshold_ = 32;
|
compilerSmallFunctionWarmUpThreshold_ = 36;
|
||||||
// Inline callees a bit earlier once a script becomes warm.
|
// Keep inlining warm-up close to default to avoid excessive early
|
||||||
inliningWarmUpThresholdFactor_ = 0.08;
|
// compilation work during page startup.
|
||||||
|
inliningWarmUpThresholdFactor_ = 0.10;
|
||||||
inliningRecompileThresholdFactor_ = 4;
|
inliningRecompileThresholdFactor_ = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,14 +116,13 @@ OptimizationInfo::compilerWarmUpThreshold(JSScript* script, jsbytecode* pc) cons
|
||||||
warmUpThreshold *= ratio;
|
warmUpThreshold *= ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
// jQuery spends a lot of time in medium-small wrappers that are too large
|
// Medium-small helper scripts can benefit from earlier Ion entry, but only
|
||||||
// to be classified as "small" but still hot enough to benefit from Ion.
|
// when considering loop-entry OSR. Applying this at function entry can hurt
|
||||||
// Nudge these scripts toward earlier compilation without affecting large
|
// large app startup latency (for example, video sites with many wrappers).
|
||||||
// scripts that are expensive to optimize.
|
if (pc && script->length() <= 400 && numLocalsAndArgs <= 48) {
|
||||||
if (script->length() <= 400 && numLocalsAndArgs <= 48) {
|
warmUpThreshold = (warmUpThreshold * 4) / 5;
|
||||||
warmUpThreshold = (warmUpThreshold * 3) / 4;
|
if (warmUpThreshold < 40)
|
||||||
if (warmUpThreshold < 30)
|
warmUpThreshold = 40;
|
||||||
warmUpThreshold = 30;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pc || JitOptions.eagerCompilation)
|
if (!pc || JitOptions.eagerCompilation)
|
||||||
|
|
|
||||||
|
|
@ -167,9 +167,9 @@ DefaultJitOptions::DefaultJitOptions()
|
||||||
// invalidating the script.
|
// invalidating the script.
|
||||||
SET_DEFAULT(osrPcMismatchesBeforeRecompile, 6000);
|
SET_DEFAULT(osrPcMismatchesBeforeRecompile, 6000);
|
||||||
|
|
||||||
// The bytecode length limit for small function. jQuery has many helpers
|
// The bytecode length limit for small function. Keep this modest to avoid
|
||||||
// just above 200 bytecodes, so raise this to compile them sooner.
|
// startup regressions from classifying too many wrapper functions as small.
|
||||||
SET_DEFAULT(smallFunctionMaxBytecodeLength_, 320);
|
SET_DEFAULT(smallFunctionMaxBytecodeLength_, 256);
|
||||||
|
|
||||||
// An artificial testing limit for the maximum supported offset of
|
// An artificial testing limit for the maximum supported offset of
|
||||||
// pc-relative jump and call instructions.
|
// pc-relative jump and call instructions.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue