And he hangs out here. :)

As you'd expect, CssTree.RuleSets (and all the other parse tree nodes) are
retained as long as the root of the parse tree is retained.  Nothing in the
Caja parser retains a reference to the root of the parse tree after the
parse.  In
Shindig, 
shindig/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaCssParser.java
has a parsed css cache - is that the cache you're referring to?

A quick check to test this would be to turn that off that cache and see if
you still see a lot of CssTree.Rulesets retained.

jas


On Wed, Oct 19, 2011 at 11:48 AM, Ryan J Baxter <rjbax...@us.ibm.com> wrote:

> You want to ask Jasvir, he is the Caja lead at Google :)
>
> -Ryan
>
> Email: rjbax...@us.ibm.com
> Phone: 978-899-3041
> developerWorks Profile
>
>
>
> From:   Stanton Sievers/Westford/IBM@Lotus
> To:     dev@shindig.apache.org,
> Date:   10/19/2011 02:21 PM
> Subject:        Memory concerns: what is the "normal" amount of
> CssTree.RuleSet objects to see at runtime
>
>
>
> Hi everyone,
>
> I'm seeing a lot of com.google.caja.parser.css.CssTree$RuleSet objects
> when running Shindig.  I'm seeing around 1700 of these RuleSet objects
> being retained, which equates to between 9MB and 10MB.  This constitutes
> ~15% of the total heap size!  These RuleSets appear to be in an ArrayList
> that is referenced by com.google.caja.parser.ChildNodes (at least
> according to Eclipse Memory Analyzer).
>
> Is this normal?  Is it possible EhCache is hanging onto a bunch of these
> objects?
>
> I want to get everyone's opinion here before I post something to the Caja
> folks.
>
> Thanks,
> -Stanton
>
>
>
>
>

Reply via email to