summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/BrowserFrame.java
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-02-15 02:15:37 -0800
committerGrace Kloba <klobag@google.com>2010-03-01 10:36:15 -0800
commit2036dbab1726c34953360a7a56d6b9ef1f2aa7dd (patch)
tree73037324cfbc6eb5baa32e46b05d9d37af44063f /core/java/android/webkit/BrowserFrame.java
parentb4e193991f9efc74978c004bcd9463cc5e85250c (diff)
downloadframeworks_base-2036dbab1726c34953360a7a56d6b9ef1f2aa7dd.zip
frameworks_base-2036dbab1726c34953360a7a56d6b9ef1f2aa7dd.tar.gz
frameworks_base-2036dbab1726c34953360a7a56d6b9ef1f2aa7dd.tar.bz2
Add a new WebCoreWorker thread to handle the tasks
which should not block either UI or WebKit. It handles local file access, cache access and trim cache. Move createCache, saveCache and most of getCache out of WebCore thread so that slow IO and database will not affect loading performance. getCache can be still called from WebCore thread in the uncommon cases like redirect and POST validation. Move cache ticker from WebCore thread to WebViewWorkerThread. Move setCookie from WebCore thread to WebViewWorkerThread. Remove the unreferenced files in the cache directory while trim cache. Confirmed with our SQL expert, Vasu, there is no need to wrap clearCache with end/startTransaction any more. http://b/issue?id=2414792 http://b/issue?id=2475242
Diffstat (limited to 'core/java/android/webkit/BrowserFrame.java')
-rw-r--r--core/java/android/webkit/BrowserFrame.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index 3f1672a..1c0d55f 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -407,7 +407,8 @@ class BrowserFrame extends Handler {
}
}
}
- CacheManager.trimCacheIfNeeded();
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_TRIM_CACHE);
break;
}