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



Firefox OS
4 years ago
3 years ago


(Reporter: jingmei.zhang, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [dp2])


(3 attachments)



4 years ago
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:

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.

Comment 1

4 years ago
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)


4 years ago
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.

Comment 2

4 years ago
Created attachment 8544432 [details] [diff] [review]

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!


4 years ago
Whiteboard: [dp2]
Keywords: perf


4 years ago
Blocks: 1123554

Comment 3

4 years ago
Comment on attachment 8544432 [details] [diff] [review]

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+

Comment 4

4 years ago
Feedbacked in the previous comment.
Flags: needinfo?(dkuo)

Comment 5

4 years ago
Created attachment 8551742 [details] [diff] [review]

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)

Comment 6

4 years ago
Created attachment 8553547 [details] [diff] [review]

Hi Dominic,

Please help to give feedback on the lastest patch:)

Comment 7

4 years ago
update for the newest music cold start data from SPRD QA:

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


3.018s,2.95s,2.893s;every cost:2.954s

Comment 8

3 years ago
This bug applies to OGA only. The NGA analogue for this bug is bug 1139926.
Last Resolved: 3 years ago
Flags: needinfo?(dominickuo)
Resolution: --- → DUPLICATE
Duplicate of bug: 1139926
You need to log in before you can comment on or make changes to this bug.