SearchTags |
Disabling the cacheA goal of mine is to decrease and limit the memory usage of WebKit. In embedded environments, memory can be even more important than performance. I was interested how can the memory consumption be lowered with the functionality already present in WebKit's code base, i.e., without too much hacking of the code. I experimented with QtWebKit, revision 42745. In main(), I found two method calls that set up the resource cache of WebKit. These can be used to disable the cache:
The effect of this modification was measured on an x86-linux box. (First, I did the measurement on a vanilla QtWebKit, but since WebKit is leaking and shows a constantly growing memory consumption, I had to apply a patch to fix the issue. Then, I kept using this patch in all measurements.) In the measurements, I compared the maximum resident set size (maxRSS) of QtLauncher executed with caches enabled and disabled (as given above). I measured two scenarios: in the first, I loaded 5 pages in a loop (1, 2, 3, 4, 5), while in the second, I loaded 170 pages one after the other (they were collected from Alexa by recursive webcrawling).
(PS: Interestingly, when the leak-fixing patch was not applied to the code, disabling the cache had no effect on the maxRSS.) |
BenchmarkLinux - x86Methanol Monthly archive
|
Post new comment