Closed Bug 1949978 Opened 1 year ago Closed 2 months ago

Investigate how to flush StartupCache for mobile app-link performance test

Categories

(Core :: Performance Engineering, task)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: tcampbell, Assigned: mstange)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxpe])

Attachments

(1 file)

As part of Bug 1618391, we noticed that the gecko "StartupCache" typically doesn't flush until about 1-2min after browser starts. For the purpose of testing, Bug 1631991 added a shorter timeout for GTest configurations though that doesn't apply to our applink startup perf test.

We should consider if waiting a full minute to get a startupcache flush is still the right move, especially on Android where user behaviour can be frenetic. A potential thing to consider is being more aggressive with flush if the cache doesn't exist at all yet. With the ScriptPreloader we added a flush to browser startup idle and there haven't been complaints about that extra I/O, so having startup cache flush at same time seems reasonable.

On desktop, we use the shutdown event to help handle cases were we close before the standard timer, but that doesn't apply as much to Android where we don't have such clean shutdowns.

Additionally, the ScriptPreloader flushing at the end of each startup is probably too aggressive and we need a different schedule for that on mobile.

See Also: → 1951745
Severity: -- → S3
Flags: needinfo?(dpalmeiro)

The current delay is set to 60s:

static uint8_t STARTUP_CACHE_WRITE_TIMEOUT = 60;

We should investigate flushing this cache at an earlier time as long as it doesn't interfere with the startup path too much.

Duplicate of this bug: 1554395

Triage: Possible duplicate.

See Also: → 2007546

(In reply to Jonathan Almeida [:jonalmeida] from comment #4)

Triage: Possible duplicate.

Not a duplicate - ScriptPreloader and StartupCache are two distinct mechanisms.

Whiteboard: [fxpe]

I'll look into this. I think we can just add an "early write" if no cache file exists.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED

This will make Firefox behavior in our performance CI tests more realistic:
These tests perform a warmup run which is killed before the regular
StartupCache write occurs. We don't really want to increase the time for
the warmup run, and I believe the behavior introduced in this patch makes
sense regardless - if there's no cache, writing out an incomplete cache
is better than waiting for more complete data and failing to write it out.

Flags: needinfo?(dpalmeiro)
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
QA Whiteboard: [qa-triage-done-c151/b150]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: