[meta] Investigate performance impact of the shim redirect
Categories
(Core :: XPConnect, task)
Tracking
()
People
(Reporter: arai, Assigned: arai)
References
Details
(Keywords: meta)
The shim introduced by bug 1766761 triggers extra load for chrome://
and resource://
URIs, and it might cause some performance regression.
We should investigate if there's any notable regression,
and also in that case, see if adding fast-path with static redirect list there makes any difference.
Assignee | ||
Comment 1•3 years ago
|
||
Very straightforward fast-path
https://hg.mozilla.org/try/rev/8e7bcdc43c787f60ca35c7d810fe334ac0e45a99
Given there will be ~1300 items, we'd better having perfect hash or something ultimately. now testing that approach as well.
Assignee | ||
Comment 2•3 years ago
|
||
Testing the performance with bug 1777486 patch (Services.jsm and XPCOMUtils.jsm migrated without touching the consumers)
Redirect after failure: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=d53d346387633abf09450f0212d7c41b1bea3f25&newProject=try&newRevision=cd4cb9a330e83d5f008175e578bfbfaa286f1c76&framework=1&page=1
Redirect with static list: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=d53d346387633abf09450f0212d7c41b1bea3f25&newProject=try&newRevision=ec2f0bedb57c08c1b9346955796f71f3b185fd4c&framework=1&page=1&showOnlyComparable=1
Assignee | ||
Comment 3•3 years ago
|
||
The current code doesn't cache the redirect itself, so the not-found error will happen every time.
I'll check the performance with caching the redirect as well.
Assignee | ||
Comment 4•3 years ago
|
||
the comparison above clearly shows that the current shim hits regression, up to 10% in startup performance.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Redirect after failure + cache redirect: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=d53d346387633abf09450f0212d7c41b1bea3f25&newProject=try&newRevision=4289e2c0f46ad7c57514b5b650c2dcad3d283cb9&framework=1
Looks like the perf regression can be solved by caching the redirect.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Description
•