Performance optimization for playlist stuff
It takes long time to add lots of members to a playlist with
ContentResolver#bulkInsert. It's because the number of queries
exponentially increases each time a member is added. That's why
resolvePlaylistMembers is moved out of loop. Moreover, to reduce the
number of queries, resolvePlaylistMembers queries the existing members
at once.
In order to check the performance, new test is also added.
Bug: 169398083
Test: atest MediaProviderTests MediaProviderClientTest
Merged-In: Iedf133aab3f5ae3f8a79fc4762b4c2fc1eaf7c7a
Change-Id: Iedf133aab3f5ae3f8a79fc4762b4c2fc1eaf7c7a
(cherry picked from commit d4b8e275be32e363369049bcec08fa026d853bf2)
3 files changed