diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/netsurf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c index cc823d4e9..822f81a77 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -121,7 +121,16 @@ void netsurf_init(int argc, char** argv) void netsurf_poll(void) { - content_clean(); + static unsigned int last_clean = 0; + unsigned int current_time = wallclock(); + + /* avoid calling content_clean() more often than once every 5 + * seconds. + */ + if (last_clean + 500 < current_time) { + last_clean = current_time; + content_clean(); + } gui_poll(fetch_active); fetch_poll(); } |