Closed Bug 2030623 Opened 4 months ago Closed 4 months ago

Delay the disk cache handling to avoid overlapping with performance-sensitive calculation after the pageload

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Derived from bug 2029129 comment #12.

In the speedometer3 testcase, the disk cache handling happens during the testcase is still actively running.
Currently the disk cache handling is scheduled with "idle" priority, but apparently that's not enough to avoid overlapping with performance-sensitive calculation after the pageload.
Given that with the stencil navigation cache, the disk cache handling can be done at any time, completely separated than single page load,
we could for example schedule that to perform only when there's no heavy activity for certain amount of period.

For example, schedule the disk cache handling only when there's no pageload activity for 10 seconds:

  • In SharedScriptCache::MaybeScheduleUpdateDiskCache, schedule a timer with 10 seconds timeout
    • If there's any existing timer, cancel it, and re-schedule 10 seconds timeout, so that if another pageload happens, that delays the schedule
  • only after the 10 seconds timer fully times out, perform the disk cache handling
Pushed by arai_a@mac.com: https://github.com/mozilla-firefox/firefox/commit/887029b44ecf https://hg.mozilla.org/integration/autoland/rev/d97e3914a8e7 Delay the disk cache save to avoid overlapping with performance-sensitive timing. r=nbp
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
QA Whiteboard: [qa-triage-done-c152/b151]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: