You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Maurice Amsellem (JIRA)" <ji...@apache.org> on 2012/10/15 10:38:03 UTC

[jira] [Created] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Maurice Amsellem created FLEX-33216:
---------------------------------------

             Summary: 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


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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Nick Kwiatkowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500299#comment-13500299 ] 

Nick Kwiatkowski commented on FLEX-33216:
-----------------------------------------

This issue was committed to the devleopment tree, which represents release 4.9.0.  When 4.9.0 is released, this fix will be included. 
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Comment Edited] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Monette A (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500123#comment-13500123 ] 

Monette A edited comment on FLEX-33216 at 11/19/12 10:23 AM:
-------------------------------------------------------------

Hi Frédéric,

Many thanks for this patch, we've been waiting for it since a long time.

Unfortunately, we are not very much experienced in all the Apache project and from this we don’t know too much on how to apply the necessary fix.
Is it possible to get somewhere the chart swc?
Or
We know how to get the chart library source, but from this where can we find instructions on how to compile it?
Or
Should we get the full 4.9 project knowing that we are still on Adobe Flex 4.5 and we were not migrating for the performance issue?
Does the actual 4.9 include your fix?

Anyway, many thanks for the work of the community and we hope we will be able to contribute at one point when our team will be re-enforced.

Cheers,
Monette
                
      was (Author: monette):
    Hi Frédéric,

Many thanks for this patch, we've been waiting for it since a long time.

Unfortunately, we are not very much experienced in all the Apache project and from this we don’t know too much on how to apply the necessary fix.
Is it possible to get somewhere the chart swc?
Or
We know how to get the chart library source, but from this where can we find instructions on how to compile it?
Or
Should we get the full 4.9 project knowing that we are still on Adobe Flex 4.5 and we were not migrating for the performance issue?
Does the actual 4.9 include your fix?

Anyway, many thanks for the work of the community and we hope we will be able to contribute at one point when our team will be re-enforced.


Cheers,
Monette
                  
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500178#comment-13500178 ] 

Frédéric THOMAS commented on FLEX-33216:
----------------------------------------

It’s not as big as you mentioned it, I sent you both the files.
 
On side note, if you have time and resources, migrating to Apache Flex 4.8 is not such a big deal (I recently did it on a big mavenized project and I had fun).

                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494774#comment-13494774 ] 

Frédéric THOMAS commented on FLEX-33216:
----------------------------------------

Someone to review the patch ?
                
> 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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Monette A (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500123#comment-13500123 ] 

Monette A commented on FLEX-33216:
----------------------------------

Hi Frédéric,

Many thanks for this patch, we've been waiting for it since a long time.

Unfortunately, we are not very much experienced in all the Apache project and from this we don’t know too much on how to apply the necessary fix.
Is it possible to get somewhere the chart swc?
Or
We know how to get the chart library source, but from this where can we find instructions on how to compile it?
Or
Should we get the full 4.9 project knowing that we are still on Adobe Flex 4.5 and we were not migrating for the performance issue?
Does the actual 4.9 include your fix?

Anyway, many thanks for the work of the community and we hope we will be able to contribute at one point when our team will be re-enforced.


Cheers,
Monette
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497912#comment-13497912 ] 

Frédéric THOMAS commented on FLEX-33216:
----------------------------------------

Thanks Nick for having applied the patch and Maurice for having raised the issue.
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Resolved] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Nick Kwiatkowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Kwiatkowski resolved FLEX-33216.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.9.0
    
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500144#comment-13500144 ] 

Frédéric THOMAS commented on FLEX-33216:
----------------------------------------

Hi Monette,

This patch has been applied on the 4.9 only and only the 4.8 is officialy distribuated.

You can try that but at your own risk:
If I wanted to use this patch on the 4.5, I would try to build the 4.9 (following the readme.txt at the root of the sdk), unzip the chart.swc generated and change the flex version from 4.9 to 4.5 in the catalog.xml, re-zip it to chart.swc and try if it works.
(personaly, I've got a chart.swc 4.8 with this patch included and sources, if you want to try it, give me an email address where I can send that to you).
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500184#comment-13500184 ] 

Frédéric THOMAS commented on FLEX-33216:
----------------------------------------

Hi,

Please, keep me in touch, I'ld like to know if it works on the 4.5 (I can't remember if it's nescessary to change the flex version in the catalog.xml but I recommend it).
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Nick Kwiatkowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494928#comment-13494928 ] 

Nick Kwiatkowski commented on FLEX-33216:
-----------------------------------------

Patch approved.  Committed with SVN revision 1408058.   This code is now in the development trunk. Thanks!
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Assigned] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Nick Kwiatkowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Kwiatkowski reassigned FLEX-33216:
---------------------------------------

    Assignee: Nick Kwiatkowski
    
> 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
>            Assignee: Nick Kwiatkowski
>              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

[jira] [Comment Edited] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Maurice Amsellem (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476032#comment-13476032 ] 

Maurice Amsellem edited comment on FLEX-33216 at 10/15/12 8:46 AM:
-------------------------------------------------------------------

One reason of this performance degradation is that Flex4 Chart style initialization is called for every instance, whereas it should be called only once.

Example for CartesianChart:

	override public function set moduleFactory(factory:IFlexModuleFactory):void
	{
		super.moduleFactory = factory;		
		if (_moduleFactoryInitialized)
			return;		
		_moduleFactoryInitialized = true;				
		initStyles();
		styleManager.registerInheritingStyle("axisTitleStyleName");
	}

	private function initStyles():Boolean
	{
		HaloDefaults.init(styleManager);
		
		var cartesianChartStyle:CSSStyleDeclaration =
			HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
		
		cartesianChartStyle.defaultFactory = function():void
		{
			this.axisColor = 0xD5DEDD;
			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
			this.dataTipRenderer = DataTip;
			this.fill = new SolidColor(0xFFFFFF, 0);
			this.calloutStroke = new Stroke(0x888888,2);            
			this.fontSize = 10;
			this.horizontalAxisStyleName = "blockCategoryAxis";
			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
			this.secondVerticalAxisStyleName = "blockNumericAxis";
			this.verticalAxisStyleName = "blockNumericAxis";
			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
			this.verticalAxisStyleNames = ["blockNumericAxis"];
		}
		
		return true;
	}



                
      was (Author: mamsellem):
    One reason of this performance degradation is that Flex4 Chart style initialization is called for every instance, whereas it should be called only once.

Example for CartesianChart
{code}
	override public function set moduleFactory(factory:IFlexModuleFactory):void
	{
		super.moduleFactory = factory;		
		if (_moduleFactoryInitialized)
			return;		
		_moduleFactoryInitialized = true;				
		initStyles();
		styleManager.registerInheritingStyle("axisTitleStyleName");
	}

	private function initStyles():Boolean
	{
		HaloDefaults.init(styleManager);
		
		var cartesianChartStyle:CSSStyleDeclaration =
			HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
		
		cartesianChartStyle.defaultFactory = function():void
		{
			this.axisColor = 0xD5DEDD;
			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
			this.dataTipRenderer = DataTip;
			this.fill = new SolidColor(0xFFFFFF, 0);
			this.calloutStroke = new Stroke(0x888888,2);            
			this.fontSize = 10;
			this.horizontalAxisStyleName = "blockCategoryAxis";
			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
			this.secondVerticalAxisStyleName = "blockNumericAxis";
			this.verticalAxisStyleName = "blockNumericAxis";
			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
			this.verticalAxisStyleNames = ["blockNumericAxis"];
		}
		
		return true;
	}

{code}


                  
> 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
>
> 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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Maurice Amsellem (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476032#comment-13476032 ] 

Maurice Amsellem commented on FLEX-33216:
-----------------------------------------

One reason of this performance degradation is that Flex4 Chart style initialization is called for every instance, whereas it should be called only once.

Example for CartesianChart
{code}
	override public function set moduleFactory(factory:IFlexModuleFactory):void
	{
		super.moduleFactory = factory;		
		if (_moduleFactoryInitialized)
			return;		
		_moduleFactoryInitialized = true;				
		initStyles();
		styleManager.registerInheritingStyle("axisTitleStyleName");
	}

	private function initStyles():Boolean
	{
		HaloDefaults.init(styleManager);
		
		var cartesianChartStyle:CSSStyleDeclaration =
			HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
		
		cartesianChartStyle.defaultFactory = function():void
		{
			this.axisColor = 0xD5DEDD;
			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
			this.dataTipRenderer = DataTip;
			this.fill = new SolidColor(0xFFFFFF, 0);
			this.calloutStroke = new Stroke(0x888888,2);            
			this.fontSize = 10;
			this.horizontalAxisStyleName = "blockCategoryAxis";
			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
			this.secondVerticalAxisStyleName = "blockNumericAxis";
			this.verticalAxisStyleName = "blockNumericAxis";
			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
			this.verticalAxisStyleNames = ["blockNumericAxis"];
		}
		
		return true;
	}

{code}


                
> 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
>
> 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

[jira] [Updated] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Frédéric THOMAS (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frédéric THOMAS updated FLEX-33216:
-----------------------------------

    Attachment: FLEX-33216.patch
    
> 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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Maurice Amsellem (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479048#comment-13479048 ] 

Maurice Amsellem commented on FLEX-33216:
-----------------------------------------

Thanks a lot for the patch.
                
> 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

[jira] [Commented] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Monette A (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500166#comment-13500166 ] 

Monette A commented on FLEX-33216:
----------------------------------

Hi Frédéric,

Many thanks for your quick reply. 
Yes, if you could provide me as you propose the "chart.swc 4.8 with this patch included and sources", it will be really great as we were struggling with this issue.
As the chart library is around 2.56Mb and the source is approximately the same size, could you do two emails, it’s safer.
My email address is monette@ublys.com.

Many thanks.
                
> 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
>            Assignee: Nick Kwiatkowski
>              Labels: performance
>             Fix For: Apache Flex 4.9.0
>
>         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

[jira] [Comment Edited] (FLEX-33216) Chart initialization performance degradation between Flex 3 and Flex 4

Posted by "Maurice Amsellem (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-33216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476032#comment-13476032 ] 

Maurice Amsellem edited comment on FLEX-33216 at 10/15/12 8:47 AM:
-------------------------------------------------------------------

One reason of this performance degradation is that Flex4 Chart style initialization is called for every instance, whereas it should be called only once.

Example for CartesianChart:

	override public function set moduleFactory(factory:IFlexModuleFactory):void
	{
		super.moduleFactory = factory;		
		if (_moduleFactoryInitialized)
			return;		
		_moduleFactoryInitialized = true;				
		initStyles();
		styleManager.registerInheritingStyle("axisTitleStyleName");
	}

	private function initStyles():Boolean
	{
		HaloDefaults.init(styleManager);
		
		var cartesianChartStyle:CSSStyleDeclaration =
			HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
		
		cartesianChartStyle.defaultFactory = function():void
		{
			this.axisColor = 0xD5DEDD;
			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
			this.dataTipRenderer = DataTip;
			this.fill = new SolidColor(0xFFFFFF, 0);
			this.calloutStroke = new Stroke(0x888888,2);            
			this.fontSize = 10;
			this.horizontalAxisStyleName = "blockCategoryAxis";
			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
			this.secondVerticalAxisStyleName = "blockNumericAxis";
			this.verticalAxisStyleName = "blockNumericAxis";
			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
			this.verticalAxisStyleNames = ["blockNumericAxis"];
		}
		
		return true;
	}

Chart support classes are also affected.

                
      was (Author: mamsellem):
    One reason of this performance degradation is that Flex4 Chart style initialization is called for every instance, whereas it should be called only once.

Example for CartesianChart:

	override public function set moduleFactory(factory:IFlexModuleFactory):void
	{
		super.moduleFactory = factory;		
		if (_moduleFactoryInitialized)
			return;		
		_moduleFactoryInitialized = true;				
		initStyles();
		styleManager.registerInheritingStyle("axisTitleStyleName");
	}

	private function initStyles():Boolean
	{
		HaloDefaults.init(styleManager);
		
		var cartesianChartStyle:CSSStyleDeclaration =
			HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
		
		cartesianChartStyle.defaultFactory = function():void
		{
			this.axisColor = 0xD5DEDD;
			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
			this.dataTipRenderer = DataTip;
			this.fill = new SolidColor(0xFFFFFF, 0);
			this.calloutStroke = new Stroke(0x888888,2);            
			this.fontSize = 10;
			this.horizontalAxisStyleName = "blockCategoryAxis";
			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
			this.secondVerticalAxisStyleName = "blockNumericAxis";
			this.verticalAxisStyleName = "blockNumericAxis";
			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
			this.verticalAxisStyleNames = ["blockNumericAxis"];
		}
		
		return true;
	}



                  
> 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
>
> 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