Closed Bug 1035135 Opened 10 years ago Closed 10 years ago

Settings app launch latency has regressed

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.0+, b2g-v1.3 unaffected, b2g-v2.0 affected, b2g-v2.1 affected)

RESOLVED DUPLICATE of bug 1024893
2.0 S6 (18july)
blocking-b2g 2.0+
Tracking Status
b2g-v1.3 --- unaffected
b2g-v2.0 --- affected
b2g-v2.1 --- affected

People

(Reporter: tkundu, Assigned: arthurcc)

References

Details

(Keywords: perf, regression, Whiteboard: [c=regression p= s=2014.07.18.t u=2.0] [caf priority: p2][CR 690201])

Settings app launch latency has regressed compared to v1.3.

For v1.3:
gaia: https://www.codeaurora.org/cgit/quic/lf/b2g/mozilla/gaia/commit/?h=mozilla/v1.3&id=e08beb0297aff472b5c84437e9d7eaf8c0400a29
gecko: https://www.codeaurora.org/cgit/quic/lf/b2g/mozilla/gecko/commit/?h=mozilla/v1.3&id=e0bfab94fd20e4dcbb2fecf19d7c2dc606189f81




For v2.0:
gaia: https://www.codeaurora.org/cgit/quic/lf/b2g/mozilla/gaia/commit/?h=mozilla/v2.0&id=ef67af27dff3130d41a9139d6ae7ed640c34d922
gecko: https://www.codeaurora.org/cgit/quic/lf/b2g/mozilla/gecko/commit/?h=mozilla/v2.0&id=d3eae03cdf4e6944e646d05938a22dc1380a0d95


Test Steps:
1) Flush v1.3 and v2.0 build on two flame device (512MB) device. Launch settings app and compare side by side.

2) launch latency = touchdown to displaying settings options
   In v1.3 launch latency is : 1.6 secs
   In v2.0 launch latency is : 2.5 secs

I found that Settings app's main thread is taking lots of time inside 
[1] PresShell::FlushPendingNotifications() : http://mxr.mozilla.org/mozilla-aurora/source/layout/base/nsPresShell.cpp#4108 ===> 600ms
[2] PresShell::Paint() : http://mxr.mozilla.org/mozilla-aurora/source/layout/base/nsPresShell.cpp#6082 ==> 400ms

I also saw that settings app is drawing a FULL WHITE WINDOW 1st then it is displaying settings options which does not happen for other app launch usecase.

It can be seen by comparing v1.3 and v2.0 build side by side.
blocking-b2g: --- → 2.0?
Keywords: perf, regression
Ni :mlee, to get started on the perf investigation/comments here.
Flags: needinfo?(mlee)
Evelyn,
Who on the Settings team can look into this?
Status: NEW → ASSIGNED
Flags: needinfo?(mlee) → needinfo?(ehung)
Whiteboard: [c=regression p= s= u=]
Whiteboard: [c=regression p= s= u=] → [c=regression p= s= u=] [CR 690201]
Hi Tim, need your help to look into this, thanks.
Flags: needinfo?(timdream)
Whiteboard: [c=regression p= s= u=] [CR 690201] → [caf priority: p2][c=regression p= s= u=] [CR 690201]
Arthur should be needinfo'd here.
Flags: needinfo?(timdream)
Flags: needinfo?(ehung)
Flags: needinfo?(arthur.chen)
After bug 973453 landed the dom elements of the root panel are no longer in index.html, which means we will inevitably have a blank screen and ui reflow during launch. The patch for bug 1007600 tried to display the title of the panel being launched as soon as the app gets loaded. I believe it could improve the perceived performance.
Flags: needinfo?(arthur.chen)
some related issue might be based on CSS media query in bug 997101, which is landed yesterday.
let's see how the launch latency goes.
Triage: +'ing for performance regression. Arthur to provide a perceived performance fix here.

Note that qawanted refer to a measurement after bug 997101 is landed.
Assignee: nobody → arthur.chen
blocking-b2g: 2.0? → 2.0+
Really add qawanted to get a measurement since bug 997101 is landed.
Keywords: qawanted
(In reply to Kan-Ru Chen [:kanru] from comment #8)
> Really add qawanted to get a measurement since bug 997101 is landed.

Note - we'll want to stopwatch measurements for this.
Whiteboard: [caf priority: p2][c=regression p= s= u=] [CR 690201] → [caf priority: p2][c=regression p= s= u=2.0] [CR 690201]
With the Settings app NOT running, opening Settings app takes an average of 2.052 seconds in today's Flame master build (an average of 10 attempts using a stopwatch).

> I also saw that settings app is drawing a FULL WHITE WINDOW 1st

This behavior is also observed in my test.

Tested on:
Device: Flame (512mb mem)
BuildID: 20140711035913
Gaia: c47094a26c87ba71a3da4bae54febd0da21f3393
Gecko: 1b1296d00330
Version: 33.0a1 (Master) 
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0

Setting tracking flags 1.3 and 2.0 based on original report (I didn't actually test 1.3 and 2.0).
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: qawanted
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
NI arthur here to get help next steps given QA is found this is a regression similar to CAF
Flags: needinfo?(arthur.chen)
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Set duplicate to bug 1024893 as we've already have a fix there.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(arthur.chen)
Resolution: --- → DUPLICATE
Whiteboard: [caf priority: p2][c=regression p= s= u=2.0] [CR 690201] → [c=regression p= s=2014.07.18.t u=2.0] [caf priority: p2][CR 690201]
Target Milestone: --- → 2.0 S6 (18july)
You need to log in before you can comment on or make changes to this bug.