Bug 1774796 - Add largest-first delazification strategy. r=arai
This patch adds a new off-thread delazification strategy, which adds a bit of overhead to queue function with a priority order, which put the largest function as the first functions to be delazified. The intent of this new strategy is to limit the usage of main-thread delazification to the smallest function, in case where the main-thread would win the delazification race. Differential Revision: https://phabricator.services.mozilla.com/D149651
This commit is contained in:
@@ -1701,6 +1701,10 @@ nsresult ScriptLoader::AttemptAsyncScriptCompile(ScriptLoadRequest* aRequest,
|
||||
TRACE_FOR_TEST(aRequest->GetScriptLoadContext()->GetScriptElement(),
|
||||
"delazification_concurrent_depth_first");
|
||||
break;
|
||||
case JS::DelazificationOption::ConcurrentLargeFirst:
|
||||
TRACE_FOR_TEST(aRequest->GetScriptLoadContext()->GetScriptElement(),
|
||||
"delazification_concurrent_large_first");
|
||||
break;
|
||||
case JS::DelazificationOption::ParseEverythingEagerly:
|
||||
TRACE_FOR_TEST(aRequest->GetScriptLoadContext()->GetScriptElement(),
|
||||
"delazification_parse_everything_eagerly");
|
||||
|
||||
Reference in New Issue
Block a user