Closed Bug 1117047 Opened 9 years ago Closed 9 years ago

[FFOS7715 v2.1][performance]The first time we launch music app after the device is powered on,it starts slow.

Categories

(Firefox OS Graveyard :: Gaia::Music, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1139926

People

(Reporter: jingmei.zhang, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [dp2])

Attachments

(3 files)

1.157 audio files which is come from 91 albums in sdcard.
2.cold start the music app

Obtain the time between we click the music icon and the album picture is show:

(unit:s)
SPRD FFOS2.1	 1	2	3	4	5	average
totle           3.7	3.1	3.44	3.7	3.7	3.528
click->scan	2.16	2.23	2	2.1	2.26	2.15
scan->show	1.54	0.83	1.46	1.57	1.64	1.408

flame2.1   	1	2	3	4	5	average
totle           2.47	2.6	2.4	2.45	2.35	2.454
click->scan	1.71	1.68	1.85	1.78	1.64	1.732
scan->show	0.66	0.65	0.63	0.67	0.61	0.644

flame is quick than SPRD device.
Hi Dominic,

While check the codes in mediadb.js,I find in a cold start process,it will enumerate All the files in the database and then send it to show.

and we can see from comment0 that enumerate files from the database should be a most time-consuming process.

what about enumerate parts of the file and send it to show instead of wait for enumerate All files?

Can you help to give some advices to improve the performance in a music app cold start process?
Flags: needinfo?(dkuo)
Summary: [FFOS2.1][performance]The first time we launch music app after the device is powered on,it starts slow. → [FFOS7715 v2.1][performance]The first time we launch music app after the device is powered on,it starts slow.
Hi Dominic,
I try to modify the codes in our locale,and the methods mentioned in comment1 works.

The patch is in attachment,can you help to check and give some advice?

Waiting for your replay!
Whiteboard: [dp2]
Blocks: 1123554
Comment on attachment 8544432 [details] [diff] [review]
moz_1117047.patch

Review of attachment 8544432 [details] [diff] [review]:
-----------------------------------------------------------------

Hi Jingmei,

Thanks for working on this issue, the approach you gave makes sense and looks okay for me, I felt it's a more visually-performance improvement because, basically you want to display the first 9 tiles asap after the music app launches, so it's straight forward and should be nice improvement for music app.

::: apps/music/js/music.js
@@ +472,5 @@
> +            TilesView.update(song);
> +            knownSongs.push(song);
> +          });
> +          // Hide the  spinner once we've displayed the initial screen
> +          document.getElementById('spinner-overlay').classList.add('hidden');

Probably just hide the overlay once after we get the first batch, after that we can ignore it.

@@ +839,5 @@
>      // if no songs in dataSource
>      // disable the TabBar to prevent users switch to other page
>      TabBar.setDisabled(!this.dataSource.length);
> +    showCorrectOverlay();
> +    document.getElementById('views-tiles').classList.remove('hidden');

Can we also put these two lines after we got the first batch? looks like if we put them here, every time when the tiles-view updates, there two lines will be executed and make extra calls.
Attachment #8544432 - Flags: feedback+
Feedbacked in the previous comment.
Flags: needinfo?(dkuo)
Hi Dominic,

Thank you for your kindly review, ^_^

I have changed the patch as you said in comment3&4,can you help to give some feedback?
Flags: needinfo?(dkuo)
Attached patch new.patchSplinter Review
Hi Dominic,

Please help to give feedback on the lastest patch:)
update for the newest music cold start data from SPRD QA:

4.225s,4.206s,4.18s;every cost:4.204s

flame:

3.018s,2.95s,2.893s;every cost:2.954s
This bug applies to OGA only. The NGA analogue for this bug is bug 1139926.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(dominickuo)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: