incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric THOMAS <webdoubl...@hotmail.com>
Subject RE: Performence issue
Date Mon, 15 Oct 2012 08:46:20 GMT
I have to base my patch on develop or trunk ?

-----Original Message-----
From: Frédéric THOMAS [mailto:webdoublefx@hotmail.com] 
Sent: Friday, October 12, 2012 7:05 PM
To: flex-users@incubator.apache.org
Subject: Re: Performence issue

Ok, I'll do that next week, thank's for the tip.

-----Message d'origine-----
From: Alex Harui
Sent: Friday, October 12, 2012 6:16 PM
To: flex-users@incubator.apache.org
Subject: Re: Performence issue

Please file a bug (and a Patch) for that.

BTW, the FlashBuilder profiler can profile SWFs that are built from Maven.
Just go to the profiler screens and choose an external launch configuration.


On 10/12/12 5:46 AM, "Frédéric THOMAS" <webdoublefx@hotmail.com> wrote:

> Unfortunally, I wasn't able to do that in flashbuilder, I've got to 
> many mavenized projects already under IDEA, too much work to 
> reconfigure them with flashbuilder.
>
> Anyway, I've been able to deterninate the problem, the charts in flex 
> 3 had a static initializer for the styles, it's not the case in flex 
> 4, at each addChild the styles are re-computed which seems to be a 
> wrong aproach to me, 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");
> }
>
> Re-compiling the charts with this modification I've been able to get 
> back my 35% lost - on some heavy screens where I had a lot of charts 
> (ItemRenderer containing charts) - migrating from flex 3 to flex 4.
>
>
> At the moment anyway, I'm not satisfy yet, I've still got a lot of 
> flickering I hadn't got in Flex 3 and at the moment, I don't 
> understand why, it seems to be relative to styles again, the 
> initProtoChain is called too often, the component are inexplicably 
> re-layed out.
>
> Fred.
>
>
> -----Message d'origine-----
> From: Alex Harui
> Sent: Monday, October 08, 2012 5:03 PM
> To: flex-users@incubator.apache.org
> Subject: Re: Performence issue
>
> Get a copy of Flash Builder and use the profiler that comes with it.  
> It will break down the most heavily used functions.
>
>
> On 10/8/12 5:35 AM, "Frédéric THOMAS" <webdoublefx@hotmail.com> wrote:
>
>> Sorry for the firsts numbers, I did a "dir *.as" and a "dir *.mxml" 
>> /s but the sdk was in the sources and others projects too, well, 
>> finally, it's only
>> 1928 .as and 447 .mxml, not the same numbers but anyway, the rest are 
>> good numbers.
>>
>> What do you mean by "What does the profiler say is going on?", we're 
>> benchmarking every dashboard we load (our functional parts), we 
>> haven't got any particular profiler.
>>
>> In Flex 3, we still have some of the invalidatedFlags set at true 
>> after the update complete is fired, so to measure the load time of 
>> our components, we check for those flags and report the loaded status 
>> to the container.
>> protected function monitorUIComponentStatus(component:UIComponent):void {
>>             if (!m_pagelet.started) {
>>                 return;
>>             }
>>             if (!component.mx_internal::invalidateSizeFlag && 
>> !component.mx_internal::invalidatePropertiesFlag &&
>> !component.mx_internal::invalidateDisplayListFlag) {
>>                 updateSpinner();
>>                 markAsLoaded();
>>             } else {
>>                 // Not ready yet, try later
>>                 component.callLater(monitorUIComponentStatus,
>> [component]);
>>             }
>>         }
>>
>> In Flex 4, the same code gives about 35% of time in more but I 
>> noticed I received 2 update complete from the container if it 
>> contains DataGrid with a lot of charts in the ItemRenderer, one about 
>> 10% later, the other really long time after.
>>
>> The logs:
>> 2012-10-08 13:39:34,699 [829134827@qtp-1377590487-103] INFO 
>> fx0000000b.dashboardsBundle.dashboardViewerMediator - Dashboard 
>> HVP.OperationalSupervisor.Intraday.AboveProfile has finished loading.
>> Loading time: 11681 ms
>> 2012-10-08 13:39:38,268 [497865763@qtp-1377590487-101] INFO 
>> fx0000000b.dashboardsBundle.dashboardsUIModule - Dashboard 
>> application.ShellUI37.innerScrollBarsContent.modulesContainer.viewsta
>> ck.Canv as142.dashboardViewer has finished loading with 
>> updateComplete. Loading
>> time: 15578 ms
>> 2012-10-08 13:40:54,689 [823563825@qtp-1377590487-95] INFO 
>> fx0000000b.dashboardsBundle.dashboardsUIModule - Dashboard 
>> application.ShellUI37.innerScrollBarsContent.modulesContainer.viewsta
>> ck.Canv as142.dashboardViewer has finished loading with 
>> updateComplete. Loading
>> time: 91995 ms
>>
>> dashboardsUIModule is the container of the AboveProfile dashboard, it 
>> seems AboveProfile is processed twice, dashboardsUIModule contains 
>> AboveProfile and a toolbar.
>>
>> I noticed the process of updating the display list happened more than 
>> 1 time when I¹ve got lot of chart into the dashboard, which is the 
>> case of AboveProfile and LostAndStuck.
>>
>> The loading times: flex 4 / flex 3 for the dashboards containing a 
>> lot of charts AboveProfile : 10538/ 7785
>> LostAndStuck: 4860 / 2704
>>
>> Frédéric THOMAS
>>
>> -----Original Message-----
>> From: Alex Harui [mailto:aharui@adobe.com]
>> Sent: Friday, October 05, 2012 6:42 PM
>> To: flex-users@incubator.apache.org
>> Subject: Re: Performence issue
>>
>> What does the profiler say is going on?
>>
>>
>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <webdoublefx@hotmail.com> wrote:
>>
>>> Hi Alex,
>>>
>>> - The application is 6778 .as and 10315 .mxml (some of the .as are 
>>> visual components and optimized as noted in your document)
>>> - The migration is from 3.6 to 4.8
>>> - I migrated from mxml 2006 to 2009 as much as I could, only 
>>> modules, components which contains States are still in mxml 2006
>>> - Almost all the styles are in .css
>>> - Each functional part of the application is benchmarked.
>>> - I ran both version (flex 3 / 4) on the same computer, with the 
>>> same data loaded, at the same time and with FP 11.4
>>>
>>> The Flex 4 version was in compatibility mode because otherwise, with 
>>> spark, I found much more gap between both versions.
>>>
>>> The result is:
>>> I found a gap of 35% between flex 3 / 4 ( Flex 3 compatibility mode) 
>>> for the richest screens, 20% more or less for the others.
>>>
>>>
>>> -----Original Message-----
>>> From: Alex Harui [mailto:aharui@adobe.com]
>>> Sent: Friday, October 05, 2012 5:41 PM
>>> To: flex-users@incubator.apache.org
>>> Subject: Re: Performence issue
>>>
>>> Are you doing dynamic add of display objects?  If so, the latter 
>>> part of that article might pertain to you.
>>>
>>> Otherwise, please provide more information on your scenario and what 
>>> changed going from 3 to 4.  Which version of 4?
>>>
>>>
>>> On 10/5/12 5:30 AM, "Frédéric THOMAS" <webdoublefx@hotmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Even after I read that
>>>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-pr
>>>> ob l ems-mi grating-from-flex-3-x-to-flex-4-x.html I thought that 
>>>> being in flex compatibility 3.0.0 would be enough to have the same 
>>>> performances than in Flex 3, that's not the case at all, does 
>>>> someone can explain me why and if I can do something to improve them ?
>>>>
>>>> Frédéric THOMAS
>>>>
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>>
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui



Mime
View raw message