Closed Bug 865187 Opened 13 years ago Closed 8 years ago

[Music] With 700 songs loaded in SD card, most played playlist should be available in < 2 sec

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:-, b2g18+)

RESOLVED WONTFIX
blocking-b2g -
Tracking Status
b2g18 + ---

People

(Reporter: leo.bugzilla.gaia, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [c= ])

Attachments

(1 file)

1. Title : Time taken from playlist(most played) to playscreen is huge. 2. Precondition : Load SD card with 700 Music files 3. Tester's Action :Open Music player 4. Detailed Symptom (ENG.) : 1. Loaded SD card with 700 Music files 2. Open Music player 3. After the scanning is complete 4. Goto playlist 5. Select most played 6. The time taken is very huge to go to playscreen. This behaviour is also seen,if least played or highest rated from playlist is selected as well. 5. Expected : Time taken should have be less 6.Reproducibility: Y 1)Frequency Rate : 100% 7.Gaia Master/v1-train : Reproduced 8.Gaia Revision: b97dddebcb755978041b5f3f146b04ea493e50b0 9.Personal email id: parthasarathy03210@gmail.com
Flags: needinfo?(dkuo)
Right now we are calling the enumerateAll method of mediaDB, which will return the result in bulk. Cant we use the enumerate method of mediaDB here? This will give a better user experience i think.
Proposed patch for the Music list loading issue. Here I am trying to call the enumerate method instead of the enumerateAll method of mediaDB. Please comment on the UI impact it may have.
blocking-b2g: --- → leo?
(In reply to Leo from comment #2) > Created attachment 741684 [details] [diff] [review] > Here I am trying to call the enumerate method instead of the enumerateAll > method of mediaDB. > > Please comment on the UI impact it may have. If you look on the code of MediaDB, you can see the comment says, enumerateAll() batches the results and passes them in an array to the callback function, and actually enumerateAll() is the sum of enumerate(). So the total time of enumerating all the records in MediaDB will the same with enumerate() and enumerateAll(). Assuming there are 700 songs and if we enumerate() them, we can get the first record very fast, but we will get 700 callbacks to update the ui, which will block the ui for a while for sure and users cannot get a smooth ui while enumerating. The reason we use enumerateAll() in playlists is, there is only one callback to update the ui, although we have to wait for it, but the thread dosen't need to switch between rendering the ui and enumerating the records. I think the real problem here is we shouldn't do too many indexedDB actions after music app is launched, we should try to keep in-memory records so that we don't have to enumerate from MediaDB everytime. I will consider this as a performance issue and I would like to take this, but this will need a lot of changes because we have to get rid of some DB actions in music app.
Assignee: nobody → dkuo
Flags: needinfo?(dkuo)
We can't block on this bug until we've agreed upon a new v1.1 performance target.
Flags: needinfo?(leo.bugzilla.gaia)
Flags: needinfo?(ffos-product)
Whiteboard: u=user c=performance
Triage: spoke with Leo and got a target number of 2 seconds to see the most played playlist. Tracking for now, leaving needinfo for product. Please re-nominate if this should block. From comment #3 sounds like this is not a trivial amount of work.
blocking-b2g: leo? → -
tracking-b2g18: --- → +
Flags: needinfo?(leo.bugzilla.gaia)
Summary: [Music] With 700 songs loaded in SD card, time taken is very huge to switch from most played playlist to playscreen → [Music] With 700 songs loaded in SD card, most played playlist should be available in < 2 sec
Sandip, given that you've been tracking performance from a Product perspective, I'll let you comment here if you disagree with the non-blocking status.
Flags: needinfo?(ffos-product) → needinfo?(skamat)
Status: NEW → ASSIGNED
Whiteboard: u=user c=performance → c=
Understand the amount of work in comment #3. Can we get a comparative number between 1.0.1 and 1.1? Need to ensure no degradation. Also what timeframes is this being deferred to?
Flags: needinfo?(skamat)
Keywords: perf
Whiteboard: c= → c= ,
Priority: -- → P2
Dominic, please reply to Sandip's question in comment #7.
Flags: needinfo?(dkuo)
Whiteboard: c= , → [c= ]
(In reply to Sandip Kamat from comment #7) > Understand the amount of work in comment #3. Can we get a comparative number > between 1.0.1 and 1.1? Need to ensure no degradation. Also what timeframes > is this being deferred to? I think for v1.0.1 and v1.1 should be the same because that part didn't make big changes. And I was thinking to use MediaDB.getAll() to retrieve all the song records then sort them with some comparison function, this probably will be faster then waiting MediaDB.enumerateAll() finishes.
Flags: needinfo?(dkuo)
Hello Mason, what can QA help you with?
Flags: needinfo?(mchang)
Last time when UX week was hold in Taipei I have discussed this with Rob. He mentioned for the playlists(except Shuffle all) ordering by different criteria, music should only display the first 25 songs instead of all the songs in user's collection, because the playlists were intended to classify the songs by the user's listening habits, so displaying some particular number like 25 is more useful for the users. By displaying the top 25 songs music should be able to retrieve them in a short and constant time, then this bug can be resolved.
We just wanted to see if this bug was still active and if a 2 second requirement was being met. Looks like Dominic is on it from comment #11. Thanks!
Flags: needinfo?(mchang)
(In reply to Mason Chang [:mchang] from comment #12) Removing qawanted per comment 12. Feel free to throw it back on if need. :)
Keywords: qawanted
Assignee: dkuo → nobody
Blocks: 1121186
There is indeed a serious performance issue loading the playlist.
Firefox OS is not being worked on
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: