Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c164faa8 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Speed up playlist processing

The recent removal of the cache from MediaScanner (commit 58ef6890)
slowed down processing of playlists, in some cases significantly, due to every
line in a playlist prompting a query that looped over the entire audio table.

With this change, the query is only done once instead of for every line,
and the code starts iterating over the Cursor starting near the point of
the last match, instead of from the start. The latter is especially helpful
when the entire query result is too large to fit in a CursorWindow, since
it reduces the number of times that sqlite has to perform an offset query
under the hood to refil the window.

Change-Id: I9fea990b3b8c86571384de2122708fb7e809c355
parent da9deca7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment