summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-04-12 12:49:09 -0700
committerVasu Nori <vnori@google.com>2010-04-13 09:45:48 -0700
commit90a36726b7553a1e7efd2f4ecbe01d7e1b3e7a67 (patch)
tree273010b53866dffe13fe49ef206b15cff96db4de /core/java/android/app
parent275e0662c1fb96d5b0ceeb9b84e2db239b29ea27 (diff)
downloadframeworks_base-90a36726b7553a1e7efd2f4ecbe01d7e1b3e7a67.zip
frameworks_base-90a36726b7553a1e7efd2f4ecbe01d7e1b3e7a67.tar.gz
frameworks_base-90a36726b7553a1e7efd2f4ecbe01d7e1b3e7a67.tar.bz2
let apps set statement-cache size.
1. we should let apps set their statement-cache size. right n ow it is 250 is the statement-cache size for all apps and that is wasting a lot of memory. each prepared statement is averaging about 1k-5K, depending upon the complexity of sql and schema. mnake default 25 and let apps increase the size, if they need to. 2. in "adb bugreport" info, print stats on the statement-cache hits/missies and size (in number of statement cached). this will help us understand how statement-cache is being used Change-Id: Ic53a2842ef75823757492778158fcb8d5b4a28bb
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/ActivityThread.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index a556a32..ba9f005 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1447,7 +1447,7 @@ public final class ActivityThread {
private static final String HEAP_COLUMN = "%17s %8s %8s %8s %8s";
private static final String ONE_COUNT_COLUMN = "%17s %8d";
private static final String TWO_COUNT_COLUMNS = "%17s %8d %17s %8d";
- private static final String DB_INFO_FORMAT = " %8d %8d %10d %s";
+ private static final String DB_INFO_FORMAT = " %4d %6d %8d %14s %s";
// Formatting for checkin service - update version if row format changes
private static final int ACTIVITY_THREAD_CHECKIN_VERSION = 1;
@@ -1847,7 +1847,7 @@ public final class ActivityThread {
for (int i = 0; i < stats.dbStats.size(); i++) {
DbStats dbStats = stats.dbStats.get(i);
printRow(pw, DB_INFO_FORMAT, dbStats.pageSize, dbStats.dbSize,
- dbStats.lookaside, dbStats.dbName);
+ dbStats.lookaside, dbStats.cache, dbStats.dbName);
pw.print(',');
}
@@ -1898,11 +1898,12 @@ public final class ActivityThread {
int N = stats.dbStats.size();
if (N > 0) {
pw.println(" DATABASES");
- printRow(pw, " %8s %8s %10s %s", "Pagesize", "Dbsize", "Lookaside", "Dbname");
+ printRow(pw, " %4s %6s %8s %14s %s", "pgsz", "dbsz", "lkaside", "cache",
+ "Dbname");
for (int i = 0; i < N; i++) {
DbStats dbStats = stats.dbStats.get(i);
printRow(pw, DB_INFO_FORMAT, dbStats.pageSize, dbStats.dbSize,
- dbStats.lookaside, dbStats.dbName);
+ dbStats.lookaside, dbStats.cache, dbStats.dbName);
}
}