summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2008-07-07 14:05:29 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2008-07-07 14:05:29 +0000
commite7c5e16b9b4f75da948f6d27e8de19d7a149548e (patch)
treea70c6cdc790e2dc881f0f5c09f88ff9eab3a9206 /content/content.h
parent192faa217735d0ab06aeed02a01558f5c95aef72 (diff)
downloadnetsurf-e7c5e16b9b4f75da948f6d27e8de19d7a149548e.tar.gz
netsurf-e7c5e16b9b4f75da948f6d27e8de19d7a149548e.tar.bz2
Performance improvements: rather than calling content_clean() every poll, we now call it no more frequently than once every 5 seconds. Additionally, we cache the result of talloc_total_size() in content_clean() rather than calculating it twice. On large documents, this function took 25% of CPU time. This makes the fetching/rendering/scrolling/redrawing of large documents over twice as fast.
svn path=/trunk/netsurf/; revision=4527
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/content/content.h b/content/content.h
index ae43b933e..a44d36782 100644
--- a/content/content.h
+++ b/content/content.h
@@ -232,6 +232,7 @@ struct content {
unsigned int size; /**< Estimated size of all data
associated with this content, except
alloced as talloc children of this. */
+ off_t talloc_size; /**< Used by content_clean() */
char *title; /**< Title for browser window. */
unsigned int active; /**< Number of child fetches or
conversions currently in progress. */