Live mmeory from style sheet cache
----------------------------------

                 Key: TRINIDAD-1782
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1782
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Skinning
    Affects Versions:  1.2.12-core
            Reporter: Stevan Malesevic


Trinidad 1702 optimized a memory for style cache by introducing cache map. 
There are a couple of issues with this fix and couple of optimizations that 
should be done to reduce memory and cpu

1. _styleNodeToStyleMap maps key to cssstlye. What happens is that StyleKey 
holds onto style properties and then CSSStyle copies style properties. So we 
end up with both StyleKey and CSSStlye pinning memory for the same thing. This 
essentially doubles a memory usage. IN some test apps memory per browser was 
7.2MB and then multipley bu number of browsers. This memory should be just 
3.6MB per browser if we avoid copy of the map in BaseStlye but rather referece 
styles
2. StyleKey should cache calculated hash code to avoid expensive computation
3.  _styleNodeToStyleMap might be moved to FileSystemStyleCache to take 
adventage of same entires on the higher , browser or verion or platform layer

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to