From e8337aad308ecab66391f20210bbce072d47c779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 7 Jan 2014 08:54:02 +0100 Subject: [PATCH] Revert "getApps(): Start Map size with the number of apps we have" This reverts commit 21747dcf408bef108187588c5ba8b8d72c4b34dc. --- src/org/fdroid/fdroid/DB.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index 4485ef21b..208e144b0 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -810,16 +810,8 @@ public class DB { } } - // Start the map at the actual number of apps we will have - Cursor c = db.rawQuery("select count(*) from "+TABLE_APP, null); - c.moveToFirst(); - int count = c.getInt(0); - c.close(); - c = null; - - Log.d("FDroid", "Will be fetching " + count + " apps, and this took us "); - - Map apps = new HashMap(count); + Map apps = new HashMap(); + Cursor c = null; long startTime = System.currentTimeMillis(); try { @@ -877,7 +869,7 @@ public class DB { c.close(); c = null; - Log.d("FDroid", "Read app data from database (took " + Log.d("FDroid", "Read app data from database " + " (took " + (System.currentTimeMillis() - startTime) + " ms)"); List repos = getRepos(); @@ -936,7 +928,7 @@ public class DB { c.close(); } - Log.d("FDroid", "Read app and apk data from database (took " + Log.d("FDroid", "Read app and apk data from database " + " (took " + (System.currentTimeMillis() - startTime) + " ms)"); }