Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Peter Kasting
On Fri, Oct 2, 2009 at 3:23 PM, Geoffrey Garen  wrote:

> Also, I'm not sure what you mean by "obtain these again". You'd need a
> mechanism to flush a resource to disk and then reload it on demand.
>

Here the assumption is that the source bits are some resource in the disk or
memory caches.

Anyway, it doesn't sound very workable or useful, so I won't investigate
further.  What I have already should be fine.

PK
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Geoffrey Garen

Live items cannot be removed from the cache.

Yeah, I think that is what I'm seeing.

Assume the page is not being painted (e.g. the window is  
minimized).  Is there a way to turn the "live" items into dead ones  
so they can be flushed?  Obviously the instant we repaint we will  
have to obtain these again.


It's not just repainting that might force you to access a live  
resource. For example, JavaScript might access the resource.


Also, I'm not sure what you mean by "obtain these again". You'd need a  
mechanism to flush a resource to disk and then reload it on demand. Of  
course, then you've created the very paging you're trying to avoid.  
So, at first glance, I don't think that's a good idea. But maybe I'm  
missing something.


Geoff___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Peter Kasting
On Fri, Oct 2, 2009 at 2:42 PM, James Robinson  wrote:

> On Fri, Oct 2, 2009 at 12:10 PM, Peter Kasting wrote:
>
>> On Fri, Oct 2, 2009 at 11:13 AM, Geoffrey Garen  wrote:
>>>
>>> Live items cannot be removed from the cache.
>>
>>
>> Yeah, I think that is what I'm seeing.
>>
>> Assume the page is not being painted (e.g. the window is minimized).  Is
>> there a way to turn the "live" items into dead ones so they can be flushed?
>>  Obviously the instant we repaint we will have to obtain these again.
>>
>> Even if this is possible, it might be _too_ aggressive, but first I just
>> wonder if it can be done at all.
>>
>
> It appears that FontCache::invalidate() does this based on the
> implementation - is that correct?  I'm not seeing any callers (but that
> might just be Visual Studio being stupid).
>

We're talking about the object cache ("cache()" rather than "fontCache()").

PK
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread James Robinson
On Fri, Oct 2, 2009 at 12:10 PM, Peter Kasting  wrote:

> On Fri, Oct 2, 2009 at 11:13 AM, Geoffrey Garen  wrote:
>>
>> Live items cannot be removed from the cache.
>
>
> Yeah, I think that is what I'm seeing.
>
> Assume the page is not being painted (e.g. the window is minimized).  Is
> there a way to turn the "live" items into dead ones so they can be flushed?
>  Obviously the instant we repaint we will have to obtain these again.
>
> Even if this is possible, it might be _too_ aggressive, but first I just
> wonder if it can be done at all.
>

It appears that FontCache::invalidate() does this based on the
implementation - is that correct?  I'm not seeing any callers (but that
might just be Visual Studio being stupid).

- James


> PK
>
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] MathML Patch Review Request

2009-10-02 Thread Alex Milowski
I have a patch that supports a number of basic elements in MathML.  The harder
ones are not included in this patch:

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

While this patch contains "rendering code", the rendering isn't that
complicated.  I'd
like to request that people who are familiar with rendering take a
look at this patch.

I feel like others than the typical few (who have been very, very helpful) can
probably review this patch because the rendering code isn't that complicated
yet.  I've left out the complicated bits (like mfenced) that I'm still
working on.

Here's my synopsis of rendering code in the patch:

RenderMathInlineContainer.cpp:

   This class provides the basic support for inline containers (like mfrac)
   that contain other inlines.  It should render as an inline-block.  It exists
   to disallow rendering of text siblings as well as provide some helper
   methods.

RenderFraction.cpp:

   Renders a mfrac ( a fraction) using a inline-block container with
   block flows.  It wraps the containing children in RenderBlock
   instances.

RenderMathSubSup.cpp

   Handles rendering msubsup which represents a base expression that has
   subscript and superscripts.  An inline table is used for the layout of
   the scripts.

RenderMathUnderOver.cpp

  Handles rendering munder, mover, and munderover.  The base expression
  has expressions over, under, or both that are organized by properly
  ordering a inline-block container with block flows.  Essentially, one class
  handles all the different cases of re-ordering the rendering of the
  element children.

Besides a basic setup for associating these elements with their rendering
objects, a number of tests along with their results have been included in
the patch.  This makes the patch larger even though the actual C++ code
isn't that large.

This patch provides actual support for rendering some basic MathML
constructs that are useful.  What is there now is just the setup for this
rendering code and, without this patch, isn't that useful.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Peter Kasting
On Fri, Oct 2, 2009 at 11:13 AM, Geoffrey Garen  wrote:
>
> Live items cannot be removed from the cache.


Yeah, I think that is what I'm seeing.

Assume the page is not being painted (e.g. the window is minimized).  Is
there a way to turn the "live" items into dead ones so they can be flushed?
 Obviously the instant we repaint we will have to obtain these again.

Even if this is possible, it might be _too_ aggressive, but first I just
wonder if it can be done at all.

PK
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Geoffrey Garen
* I notice that even when I set the WebCore::Cache capacity to zero,  
I can't necessarily dump _everything_ out of it.  Is there some  
other set of calls I should make to drop more references somewhere?


Cache::setCapacities() calls Cache::prune(), which should remove all  
dead items.


Live items cannot be removed from the cache.

If you have a scenario where calling setCapacities(0, 0, 0) doesn't  
purge all dead items from the Cache, please file a bug.


Thanks,
Geoff
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Purging as much memory as possible

2009-10-02 Thread Peter Kasting
On Thu, Oct 1, 2009 at 11:26 PM, Zoltan Herczeg wrote:

> see QWebSettings::clearMemoryCaches() (WebKit/qt/Api/qwebsettings.cpp) to
> clear memory caches


Thanks, this is super-helpful.

PK
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev