Author: jmb
Date: Tue Jan 30 00:44:53 2007
New Revision: 3156
URL:
http://svn.semichrome.net?rev=3156&view=rev
Log:
Attempt to perform content cleaning far less frequently.
Modified:
trunk/netsurf/desktop/netsurf.c
Modified: trunk/netsurf/desktop/netsurf.c
URL:
http://svn.semichrome.net/trunk/netsurf/desktop/netsurf.c?rev=3156&r1...
==============================================================================
--- trunk/netsurf/desktop/netsurf.c (original)
+++ trunk/netsurf/desktop/netsurf.c Tue Jan 30 00:44:53 2007
@@ -33,7 +33,9 @@
static void netsurf_poll(void);
static void netsurf_exit(void);
static void lib_init(void);
+static void content_clean_wrapper(void *p);
+#define CONTENT_CLEAN_FREQ (500) /* cs */
/**
* Gui NetSurf main().
@@ -83,6 +85,8 @@
fetch_init();
fetchcache_init();
gui_init2(argc, argv);
+
+ schedule(CONTENT_CLEAN_FREQ, content_clean_wrapper, NULL);
}
/**
@@ -91,7 +95,6 @@
void netsurf_poll(void)
{
- content_clean();
gui_poll(fetch_active);
fetch_poll();
}
@@ -103,6 +106,8 @@
void netsurf_exit(void)
{
+ schedule_remove(content_clean_wrapper, NULL);
+
LOG(("Closing GUI"));
gui_quit();
LOG(("Closing content"));
@@ -130,3 +135,12 @@
}
+/**
+ * Wrapper for content cleaner callback
+ */
+static void content_clean_wrapper(void *p)
+{
+ content_clean();
+
+ schedule(CONTENT_CLEAN_FREQ, content_clean_wrapper, NULL);
+}