Comment 90 for bug 215728

Revision history for this message
In , Mike Connor (mconnor) wrote :

Comment on attachment 318863
increase the page size, let the cache size grow on linux

>+#ifdef XP_WIN
>+pref("urlclassifier.updatecachemax", -1);
>+#elifdef XP_MACOSX
>+pref("urlclassifier.updatecachemax", -1);
>+#else
>+pref("urlclassifier.updatecachemax", 100 * 1024 * 1024);
>+#endif

you just want to do ifdef MOZ_WIDGET_GTK2 here, I don't think we want this on OS/2 or beos, etc.

> // The implementation version is updated during development when we
> // want to change schema, or to recover from updating bugs. When an
> // implementation version change is detected, the database is scrapped
> // and we start over.
>-#define IMPLEMENTATION_VERSION 3
>+#define IMPLEMENTATION_VERSION 4

as an aside, this is really bloody convenient. :)

>+ if (gUpdateCacheSize > 0) {
>+ PRUint32 cachePages = gUpdateCacheSize / PAGE_SIZE;
>+ nsCAutoString cacheSizePragma("PRAGMA cache_size=");
>+ cacheSizePragma.AppendInt(cachePages);
>+ rv = mConnection->ExecuteSimpleSQL(cacheSizePragma);
>+ if (NS_FAILED(rv)) {
>+ mUpdateStatus = rv;
>+ return rv;
>+ }
>+ mGrewCache = PR_TRUE;
>+ }

>+ nsCAutoString cacheSizePragma("PRAGMA page_size=");
>+ cacheSizePragma.AppendInt(PAGE_SIZE);

ITYM pageSizePragma

looks good, r=me