[Webkit-unassigned] [Bug 68434] [GTK] Implement cache model for WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 5 12:49:04 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68434


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #108325|review?                     |review-
               Flag|                            |




--- Comment #8 from Martin Robinson <mrobinson at webkit.org>  2011-10-05 12:49:04 PST ---
(From update of attachment 108325)
View in context: https://bugs.webkit.org/attachment.cgi?id=108325&action=review

> Source/WebKit2/WebProcess/gtk/WebProcessGtk.cpp:54
> +    g_object_get(G_OBJECT(cache), "cache-dir", &cacheDir.outPtr(), NULL);
> +    if (!cacheDir)
> +        return 0;

Would it make sense to attach a listener to this property to update WebCore when it changes?

>>> Source/WebKit2/WebProcess/gtk/WebProcessGtk.cpp:71
>>> +    guint64 totalMem = g_ascii_strtoull(ptr + strlen("MemTotal:"), &endPtr, 10);
>> 
>> Could we have strlen("MemTotal:") precalculated in a static variable? Maybe we could even use sysconf with _SC_PHYS_PAGES and _SC_PAGE_SIZE, it could be cleaner.
> 
> This code will usually be executed only once to set the cache model, so I don't think we need micro-optimizations here, but if you think it's worh it I don't mind to do it.

Sysconf seems like it would be a lot cleaner and not Linux only. I think it'd be better to ues that here if it makes sense to you.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list