myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeanne Waldman (JIRA)" <>
Subject [jira] Resolved: (TRINIDAD-1702) performance: decrease memory of FileSystemStyleCache by reusing CSSStyle objects.
Date Thu, 04 Feb 2010 05:16:28 GMT


Jeanne Waldman resolved TRINIDAD-1702.

       Resolution: Fixed
    Fix Version/s: 1.2.14-core 

> performance: decrease memory of FileSystemStyleCache by reusing CSSStyle objects.
> ---------------------------------------------------------------------------------
>                 Key: TRINIDAD-1702
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Skinning
>    Affects Versions: 1.2.13-core 
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>             Fix For: 1.2.14-core 
>         Attachments: CSSStyleKeyPatch12122.patch
> Our performance team gave me the following statistics:
>                                                               Objects:        Shallow
Heap    Retained
> Heap
> SkinStyleProvider                                    13               723B          
> FileSystemStyleCache$Entry               71               1704B            536M
> FileSystemStyleCache$StyleImpl       71               2272B            533M
> CSSStyle                                          315,431               7.5M        
> The application they are testing has 13 skins, therefore there are 13 SkinStyleProvider
> Each css file has about 4500 selectors in this use case. 
> In FileSystemStyleCache's StyleImpl, we create a new CSSStyle object for every selector,
even though many of the selectors have the same css property names/values. E.g., .af_inputText_xyz,
.af_selectOneChoice_xyz, .af_selectManyCheckbox_xyz {font-weight: bold; color: black} 
> To decrease the memory used, in StyleImpl we can reuse CSSStyle objects where they have
the same css property name and values. This small change saves 56% of the memory used.
> (Note: More memory should be saved in other ways, but this will be a different JIRA issue).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message