Clarification around data.days entries
Richard Newman
rnewman at mozilla.com
Tue Mar 4 07:16:13 PST 2014
>> Fennec records sessions when they *finish*, but attributes them retrospectively to the date on which the session began.
>
> Just out of interest, does that mean the currently open session is always missing?
Yes. But remember that Fennec browser sessions are way more granular than desktop's; they run from onResume to onPause, so whenever you switch apps, hit Home, or the phone goes to sleep, your session ends.
> What about ones that have been unexpectedly terminated, do we detect and record those correctly?
Orphans are detected and flushed on next startup.
>> I expect multi-day sessions to be rare enough to be ignorable.
>
> I'd not be so sure there. With the current habits of never explicitely closing apps on phones (you even need to know how you can do that if you actually want it) and not turning off phones over night, we can easily get into the browser never closing unless it's killed by the OOM killer, which might be rare on high-end devices (basically never happens on my Nexus 10 tablet, for example).
Our sessions are tied to the activity lifecycle, not the process lifecycle.
Fennec is pretty much always running for me, but I have dozens of sessions each day, because every time I interact with another activity, my session ends.
In order to get a multi-day session in Fennec you'd need to pretty much be actively browsing -- screen still on, browser in the foreground -- for 24 straight hours. My Motorola doesn't even have a "stay on" power setting!
More information about the fhr-dev
mailing list