Revert "getApps(): Start Map size with the number of apps we have"
This reverts commit 21747dcf408bef108187588c5ba8b8d72c4b34dc.
This commit is contained in:
		
							parent
							
								
									a6379a8006
								
							
						
					
					
						commit
						e8337aad30
					
				| @ -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<String, App> apps = new HashMap<String, App>(count); | ||||
|         Map<String, App> apps = new HashMap<String, App>(); | ||||
|         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<Repo> 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)"); | ||||
|         } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Martí
						Daniel Martí