Closed Bug 1024893 Opened 10 years ago Closed 10 years ago

[dolphin][v1.4]Entering settings app takes more than 2.2s

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S6 (18july)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: Xiaohong.Fan, Assigned: sergi)

References

Details

(Keywords: perf, Whiteboard: [caf priority: p2][c=progress p= s= u=dolphin] [sprd315893] [CR 690201])

Attachments

(2 files)

46 bytes, text/x-github-pull-request
yurenju
: review+
Xiaohong.Fan
: feedback+
arthurcc
: feedback+
Xiaohong.Fan
: feedback+
Details | Review
46 bytes, text/x-github-pull-request
arthurcc
: review+
yurenju
: review+
janjongboom
: feedback+
Details | Review
Steps to reproduce,
1. open the settings app from homescreen,start recording time
2. when the setting‘s main interface is loaded,stop recording time

Actual result,
Entering  settings app takes more than  2.2s,a little longer than android phone‘s.
Summary: Entering settings app takes more than 2.2s → [7715]Entering settings app takes more than 2.2s
not 1.3t branch
blocking-b2g: 1.3T? → ---
Summary: [7715]Entering settings app takes more than 2.2s → dolphin][v1.4]Entering settings app takes more than 2.2s
Whiteboard: sprd315893 → [sprd315893]
The same as Flame v1.4.
The performance is worse than dolphin android 4.4(1.4s).
status-b2g-v1.4: --- → ?
Flags: needinfo?(janjongboom)
Summary: dolphin][v1.4]Entering settings app takes more than 2.2s → [dolphin][v1.4]Entering settings app takes more than 2.2s
Flags: needinfo?(janjongboom)
James, may I know which language setting are you using? I tried on my Flame with v1.4 and settings app was launched within 1s. Please refer to the video (https://www.youtube.com/watch?v=rIDnafI5-RY)
Flags: needinfo?(james.zhang)
Loop Xiaohong.Fan,
Please attach your analysis here.
Flags: needinfo?(james.zhang) → needinfo?(Xiaohong.Fan)
Time-consuming analysis:
1) the app launches from system to settings,it takes an average of 0.9s.
2) from completing preInit  to window.addEventListener('load', function loadSettings() {...})
   it takes an average of 1.1s.
3) LazyLoader.load  takes an average of 0.37s.
Flags: needinfo?(Xiaohong.Fan)
Can we have buri 1.4 numbers here?
Flags: needinfo?(pcheng)
The avg cold load time on Buri v1.4 is about 1.5s. Please see the test results here: 
https://datazilla.mozilla.org/b2g/?branch=v1.4&device=hamachi&range=7&test=cold_load_time&app_list=marketplace,settings&app=marketplace&gaia_rev=c36c0a721ce3d509&gecko_rev=780a128fef4e&plot=median&err_bars=1

I also tested on dolphin, but it seems the performance is better on my device. It's also above 1.5s in average.

Xiaohong, could you please let us know whether you are using user build or not. Did you enable APZ for app?
Flags: needinfo?(pcheng) → needinfo?(Xiaohong.Fan)
I use the user build version, 
it takes about 2.2s to launch the settings app,
I'm sorry,what does APZ mean?
Flags: needinfo?(Xiaohong.Fan)
(In reply to Xiaohong.Fan from comment #8)

> I'm sorry,what does APZ mean?

async panning and zooming. an optimization for user input response.

on tarako, you can see it long press power button.

But it this case, there was no user input after launching the app. so I think apz won't help here.
Per comment 5 it seems you were referring to the time of loading all scripts. However, in settings app we lazy loaded things to have better perceived performance, which means the screen shows up before loading all script. I was managed to get a dolphin and had tests, the screen showed up within 2s after I clicked on the icon. My build is as the following:

Gaia      15da4fde475db99626c8a47964b12715775cd5c1
Gecko     31e829082914e3ad1833ba81eb46329f5fcb672c
BuildID   20140513061255
Version   30.0
ro.build.version.incremental=89
ro.build.date=Tue May 13 06:09:31 CST 2014
Assignee: nobody → sergi.mansilla
Attached file Github PR
This patch reduces the Settings startup time by more than 1.5 second on Flame by doing the following things:

- Load root list inline during build time, by removing the dependency on the JavaScript chain that does it dynamically. This way we don't have to wait for JavaScript to do that, and the settings list is ready right away. In order to accomplish this, a new attribute data-inline-template has been introduced.

- Removes link elements that are meant for tablet only during the build process, because it spent a lot of time (more than 200ms) executing the media query code in there. In order to accomplish that, a new attribute data-device-type has been introduced.

- Removed unnecessary background-color setting on the html and body elements (see https://bugzilla.mozilla.org/show_bug.cgi?id=1036446). Color is already set on the children elements anyway.

The difference can be seen in the following video: https://www.youtube.com/watch?v=IVHp0w7wW1Q
Attachment #8453623 - Flags: review?(arthur.chen)
See Also: → 1035135
Attachment #8453623 - Flags: feedback?(Xiaohong.Fan)
Keywords: perf
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [sprd315893] → [c=progress p= s= u=dolphin] [sprd315893]
Comment on attachment 8453623 [details] [review]
Github PR

Thanks for the patch, Sergi. I think we could try to land it first before we have the proper fix as you suggested. As one of the comments I left in github, I would suggest to move the elements to index.html so that we don't need to introduce a new build script configuration. Which also makes the app less rely on the build script.

And as the patch is involved with build script so I would like the owner of the build script have a look on the patch.
Attachment #8453623 - Flags: review?(yurenju.mozilla)
Attachment #8453623 - Flags: review?(arthur.chen)
Attachment #8453623 - Flags: feedback+
Comment on attachment 8453623 [details] [review]
Github PR

r=yurenju if removed inlineTemplate part in webapp-optimize.js according to Arthur's comment on github.
Attachment #8453623 - Flags: review?(yurenju.mozilla) → review+
Merged at 6ecc793750a99c3fc4477aaa7a601dc1d9b67b86 for master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Sergi: Can you open a bug to remove this build time optimisation for media queries? With metrics on how much it affects settings and probably a branch that Gecko engineers can experiment with. Thanks!
blocking-b2g: --- → 1.4?
Thanks for the patch
Attachment #8453623 - Flags: feedback+
Attachment #8453623 - Flags: feedback?(Xiaohong.Fan) → feedback+
blocking-b2g: 1.4? → 1.4+
Needs rebasing for v1.4/v2.0 uplift.
Flags: needinfo?(sergi.mansilla)
Target Milestone: --- → 2.0 S6 (18july)
blocking-b2g: 1.4+ → 2.0?
Whiteboard: [c=progress p= s= u=dolphin] [sprd315893] → [c=progress p= s= u=dolphin] [sprd315893] [CR 690201]
Please don't remove the blocking 1.4+ flag.
blocking-b2g: 2.0? → 1.4+
Whiteboard: [c=progress p= s= u=dolphin] [sprd315893] [CR 690201] → [caf priority: p2][c=progress p= s= u=dolphin] [sprd315893] [CR 690201]
Hi Sergi,

Could you help to provide rebased patch for v1.4? We need to land this 1.4 blocker. Thanks.
Yang, land this WIP patch and verify.
Flags: needinfo?(yang.zhao)
Flags: needinfo?(renfeng.mei)
hi,Sergi
  Could you help to merge it to v1.4? Thank you!^_^
Flags: needinfo?(yang.zhao)
Dear Sergi,
   Can you merge the patch to  V1.4  ?
   
   Happy holidays!
Patch for uplifting to 1.4
Attachment #8464659 - Flags: review?(arthur.chen)
Attachment #8464659 - Flags: feedback?(janjongboom)
Flags: needinfo?(sergi.mansilla)
Attachment #8464659 - Flags: feedback?(janjongboom) → feedback+
Please create a v2.0 patch as well? :)
Comment on attachment 8464659 [details] [review]
Version of the patch for 1.4

r=me for the settings part. Flagging Yuren for the build script.

Note that people are encouraged to use master on their tablet. I'm fine with removing settings_large.css if adding the support of multiple devices to the build script is not trivial.
Attachment #8464659 - Flags: review?(yurenju.mozilla)
Attachment #8464659 - Flags: review?(arthur.chen)
Attachment #8464659 - Flags: review+
Comment on attachment 8464659 [details] [review]
Version of the patch for 1.4

looks good. r=yurenju
Attachment #8464659 - Flags: review?(yurenju.mozilla) → review+
Thanks! Merged at d328c9aaf43d955dd45a207e8df4cf781982b3dd
looks good for me
Flags: needinfo?(renfeng.mei)
Depends on: 1050402
Flags: in-moztrap?(bzumwalt)
New test case needs to be written to address bug.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
This is done with automation for accurate results. No test case added in moztrap.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Flags: in-moztrap?(bzumwalt)
Flags: in-moztrap-
The time of Firefox v2.0 dolphin is about 3s.
James, this is not what I see actually on the Bangladesh Fly device on v1.4. Time is (manually timed) less than 2s.
Flags: needinfo?(james.zhang)
Hi Jan,

   1.4 is OK, 2.0 is slower than 1.4.
Flags: needinfo?(james.zhang)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: