bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

'apploadtime' event will fire twice when we cold start an app



Firefox OS
5 years ago
5 years ago


(Reporter: dkuo, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [c= ])



5 years ago
The results in
shows the time until apploadtime event fires for apps cold start.

In my test, the apploadtime event often fire twice when we cold start an app. If this is a bug, we probably need to fix this or we cannot rely on it to record the cold start time.


5 years ago
Blocks: 817115
Hi all,

This is because sometimes we may receive 'mozbrowserloadend' event twice in window_manager.js

Here is a simple path (test code) that will remove the event handler after it receive the 'mozbrowserloadend' event to measure the app loading time.

However, we might need to dig into the root cause of why this event would be triggered twice.

Hi Vivien,

Do you think this patch is reasonable or who should we ping to get the real fix if you don't think this is the right way to do?
Flags: needinfo?(21)
I feel like this happens because we preload a process in Gecko and during this phase we're loading about:blank. I wonder if this about:blank is what you see as the first loadend event. If I'm right you should not be able to see the first loadend event if you wait five seconds between each runs.
Flags: needinfo?(21)

Comment 3

5 years ago
Dominic, is this still a problem or should we close this bug?
Flags: needinfo?(dkuo)
Keywords: perf
Whiteboard: [c= ]

Comment 4

5 years ago
Mike, I think we should close this one because the performance matic in https://datazilla.mozilla.org/b2g seems normal for all the apps, I filed this one was because the results will be very different if we launch and kill apps repeatedly, and looks like some patch has fixed it so we can close it.
Last Resolved: 5 years ago
Flags: needinfo?(dkuo)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.