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

Unverified Commit 78b12530 authored by Likai Ding's avatar Likai Ding Committed by Michael Bestas
Browse files

Gallery: improve timeline loading performance

PAGE_SIZE in LocalMergeAlbum is small, causing many inefficient db
queries with a limit clause. Changing it to a reasonably larger
value can yield much better performance with little memory impact.

Change-Id: I4e8d75a96ab02b8c435956d182320d7721a8814f
CRs-Fixed: 984190
parent ec13c6bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ import java.util.TreeMap;
public class LocalMergeAlbum extends MediaSet implements ContentListener {
    @SuppressWarnings("unused")
    private static final String TAG = "LocalMergeAlbum";
    private static final int PAGE_SIZE = 64;
    private static final int PAGE_SIZE = 1024;

    private final Comparator<MediaItem> mComparator;
    private final MediaSet[] mSources;