Closed Bug 833035 Opened 12 years ago Closed 12 years ago

[mediadb] begin metadata parsing immediately when there is no last scan time.

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(blocking-b2g:leo+)

RESOLVED DUPLICATE of bug 814178
blocking-b2g leo+

People

(Reporter: jlal, Assigned: djf)

References

Details

(Keywords: perf, Whiteboard: [FFOS_perf])

In media db when there is no database we wait until file enumeration (device storage) is complete then begin parsing. The time between each cursor iteration can be significant so we effectively block until the entire request is complete to begin parsing.


Here is a short snippet of time between iterations (this is on a very small set of data imagine something like 500 images). Each number is the time between the last and current iteration.

[65,11,21,12,7,5,5,7,5,8,5,4,6,5,6,5,7,4,6,6,5,6,6,4,6,6,6,6,6,5,7,6,10,6,15,23,4,6,7,6]

David suggested that we can improve this by always running a "quickScan" if lastScanTime is not present. This should greatly reduce the amount of time it takes for the user to see the first image/video/music file when they have a fairly large number of media assets.
With my reference files we are spending somewhere between 10 and 15 seconds in device storage loading the 500 images and 703 music files. As this are we wait until the end of this 10-15 seconds before parsing even the first file.
Keywords: perf
Assignee: nobody → jlal
Summary: [medaidb] begin metadata parsing immediately when there is no last scan time. → [mediadb] begin metadata parsing immediately when there is no last scan time.
James,

Thanks for identifying this optimization. Bug 814178 is tef+ to speed up the music app scanning. I'll probably fix this bug as part of that one.
Re-assigning... David has a fix for this in his music patch.
Assignee: jlal → dflanagan
https://github.com/mozilla-b2g/gaia/commit/ebac3046280299ec320ecae04ca5c34a163bc3eb

Fixed in related bug (https://bugzilla.mozilla.org/show_bug.cgi?id=814178)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
See Also: → 814178
Whiteboard: [perf_tsk]
Whiteboard: [perf_tsk] → [FFOS_perf]
blocking-b2g: leo? → leo+
Resolution: FIXED → DUPLICATE
Depends on: 855232
No longer depends on: 855232
You need to log in before you can comment on or make changes to this bug.