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