You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Adam Winer (JIRA)" <de...@myfaces.apache.org> on 2007/08/18 01:34:30 UTC
[jira] Resolved: (TRINIDAD-633) StyleNode objects could be much
more lightweight
[ https://issues.apache.org/jira/browse/TRINIDAD-633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Winer resolved TRINIDAD-633.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.0.3-core
Assignee: Adam Winer
> StyleNode objects could be much more lightweight
> ------------------------------------------------
>
> Key: TRINIDAD-633
> URL: https://issues.apache.org/jira/browse/TRINIDAD-633
> Project: MyFaces Trinidad
> Issue Type: Improvement
> Reporter: Adam Winer
> Assignee: Adam Winer
> Fix For: 1.0.3-core
>
>
> We create a lot of StyleNode objects ( > 5000 in one test I ran recently), so anything that
> can be done to make these objects less heavy is a good thing.
> A couple things could be done:
> - Use singletonList() instead of unmodifiableList() around Arrays.asList() for single-element arrays
> - Check the incoming arrays not just against null, but also against being zero-element arrays,
> and use Collections.emptyList() as necessary there
> (SkinStyleSheetParserUtils, in particular, is passing in empty lists for includedStyles
> and empty sets for inhibitedProperties.)
> The former optimization saves 76 bytes every time it happens, the latter 84 bytes
> every time it happens. This can add up to a good bit of saved memory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.