[
https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479051#comment-13479051
]
Frédéric THOMAS commented on FLEX-33216:
----------------------------------------
Just uploaded a patch.
The charts in flex 3 had statics initializer for the styles, it's not the case
in flex 4, at each addChild the styles are re-computed, It should have one
static initializer per moduleFactory.
Example on CartesianChart :
instead of :
private var _moduleFactoryInitialized:Boolean = false;
should be :
private static var _moduleFactoryInitialized:Dictionary= new Dictionary(true);
instead of :
override public function set moduleFactory(factory:IFlexModuleFactory):void
{
super.moduleFactory = factory;
if (_moduleFactoryInitialized)
return;
_moduleFactoryInitialized = true;
// our style settings
initStyles();
styleManager.registerInheritingStyle("axisTitleStyleName");
}
should be :
override public function set moduleFactory(factory:IFlexModuleFactory):void
{
super.moduleFactory = factory;
if (_moduleFactoryInitialized[factory])
return;
_moduleFactoryInitialized[factory] = true;
// our style settings
initStyles();
styleManager.registerInheritingStyle("axisTitleStyleName");
}
I did that in every charts when needed and tested it against our big company
project, it does the job.
> Chart initialization performance degradation between Flex 3 and Flex 4
> ----------------------------------------------------------------------
>
> Key: FLEX-33216
> URL: https://issues.apache.org/jira/browse/FLEX-33216
> Project: Apache Flex
> Issue Type: Bug
> Components: Charts
> Affects Versions: Adobe Flex SDK 4.1 (Release), Adobe Flex SDK 4.5
> (Release), Adobe Flex SDK 4.6 (Release)
> Reporter: Maurice Amsellem
> Labels: performance
> Attachments: FLEX-33216.patch
>
>
> Chart initialization is around 35-40% slower in Flex4 than in Flex3.
> This is true for almost all chart types (Bar, Pie, Column, etc.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira