Flex Mobile

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Flex Mobile

Angelo Lazzari
Hi all,
i'm new on flex and i just wanted to know how i can open the ibook app to
choose a file and view it in my Flex Mobile app.

thank you very much!

--
Angelo Lazzari
mobile: 0039 347 0090 452
mail: [hidden email]


----------------------------
Verificate la corrispondenza del destinatario; in caso contrario vogliate
notificare ciò al mittente e, consci della responsabilita'per l'uso
indebito, cancellare il messaggio e sue copie / Verify the correspondence
of the addressee; otherwise, notify that to the sender and, conscious of
the responsibility for the undue use, destroy the message and its copies.
----------------------------
Reply | Threaded
Open this post in threaded view
|

Performence issue

Frédéric THOMAS
Hi,

Even after I read that
http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-problems-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


Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Alex Harui
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" <[hidden email]> wrote:

> Hi,
>
> Even after I read that
> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-problems-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


Reply | Threaded
Open this post in threaded view
|

RE: Performence issue

Frédéric THOMAS
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:[hidden email]]
Sent: Friday, October 05, 2012 5:41 PM
To: [hidden email]
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" <[hidden email]> wrote:

> Hi,
>
> Even after I read that
> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-probl
> 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



Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Alex Harui
What does the profiler say is going on?


On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
> Sent: Friday, October 05, 2012 5:41 PM
> To: [hidden email]
> 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" <[hidden email]> wrote:
>
>> Hi,
>>
>> Even after I read that
>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-probl
>> 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


Reply | Threaded
Open this post in threaded view
|

RE: Performence issue

Frédéric THOMAS
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.viewstack.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.viewstack.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:[hidden email]]
Sent: Friday, October 05, 2012 6:42 PM
To: [hidden email]
Subject: Re: Performence issue

What does the profiler say is going on?


On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
> Sent: Friday, October 05, 2012 5:41 PM
> To: [hidden email]
> 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" <[hidden email]> wrote:
>
>> Hi,
>>
>> Even after I read that
>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-prob
>> 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



Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Alex Harui
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" <[hidden email]> 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.viewstack.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.viewstack.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:[hidden email]]
> Sent: Friday, October 05, 2012 6:42 PM
> To: [hidden email]
> Subject: Re: Performence issue
>
> What does the profiler say is going on?
>
>
> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>> Sent: Friday, October 05, 2012 5:41 PM
>> To: [hidden email]
>> 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" <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Even after I read that
>>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-prob
>>> 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


Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Frédéric THOMAS
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: [hidden email]
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" <[hidden email]> 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.viewstack.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.viewstack.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:[hidden email]]
> Sent: Friday, October 05, 2012 6:42 PM
> To: [hidden email]
> Subject: Re: Performence issue
>
> What does the profiler say is going on?
>
>
> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>> Sent: Friday, October 05, 2012 5:41 PM
>> To: [hidden email]
>> 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" <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Even after I read that
>>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-prob
>>> 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


Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Alex Harui
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" <[hidden email]> 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: [hidden email]
> 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" <[hidden email]> 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.viewstack.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.viewstack.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:[hidden email]]
>> Sent: Friday, October 05, 2012 6:42 PM
>> To: [hidden email]
>> Subject: Re: Performence issue
>>
>> What does the profiler say is going on?
>>
>>
>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>>> Sent: Friday, October 05, 2012 5:41 PM
>>> To: [hidden email]
>>> 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" <[hidden email]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Even after I read that
>>>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-prob
>>>> 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


Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Frédéric THOMAS
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: [hidden email]
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" <[hidden email]> 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: [hidden email]
> 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" <[hidden email]> 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.viewstack.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.viewstack.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:[hidden email]]
>> Sent: Friday, October 05, 2012 6:42 PM
>> To: [hidden email]
>> Subject: Re: Performence issue
>>
>> What does the profiler say is going on?
>>
>>
>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>>> Sent: Friday, October 05, 2012 5:41 PM
>>> To: [hidden email]
>>> 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" <[hidden email]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Even after I read that
>>>> http://blogs.adobe.com/aharui/2011/04/migratory-foul-performance-prob
>>>> 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


Reply | Threaded
Open this post in threaded view
|

RE: Performence issue

Frédéric THOMAS
I have to base my patch on develop or trunk ?

-----Original Message-----
From: Frédéric THOMAS [mailto:[hidden email]]
Sent: Friday, October 12, 2012 7:05 PM
To: [hidden email]
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: [hidden email]
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" <[hidden email]> 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: [hidden email]
> 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" <[hidden email]> 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:[hidden email]]
>> Sent: Friday, October 05, 2012 6:42 PM
>> To: [hidden email]
>> Subject: Re: Performence issue
>>
>> What does the profiler say is going on?
>>
>>
>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>>> Sent: Friday, October 05, 2012 5:41 PM
>>> To: [hidden email]
>>> 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" <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Performence issue

Carol Frampton
We are doing SDK work in
https://svn.apache.org/repos/asf/incubator/flex/sdk/branches/develop.

Carol

On 10/15/12 4 :46AM, "Frédéric THOMAS" <[hidden email]> wrote:

>I have to base my patch on develop or trunk ?
>
>-----Original Message-----
>From: Frédéric THOMAS [mailto:[hidden email]]
>Sent: Friday, October 12, 2012 7:05 PM
>To: [hidden email]
>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: [hidden email]
>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" <[hidden email]> 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: [hidden email]
>> 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" <[hidden email]> 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:[hidden email]]
>>> Sent: Friday, October 05, 2012 6:42 PM
>>> To: [hidden email]
>>> Subject: Re: Performence issue
>>>
>>> What does the profiler say is going on?
>>>
>>>
>>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>>>> Sent: Friday, October 05, 2012 5:41 PM
>>>> To: [hidden email]
>>>> 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" <[hidden email]> 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
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Performence issue

Frédéric THOMAS
Ok, thank's

-----Original Message-----
From: Carol Frampton [mailto:[hidden email]]
Sent: Monday, October 15, 2012 3:55 PM
To: [hidden email]
Subject: Re: Performence issue

We are doing SDK work in
https://svn.apache.org/repos/asf/incubator/flex/sdk/branches/develop.

Carol

On 10/15/12 4 :46AM, "Frédéric THOMAS" <[hidden email]> wrote:

>I have to base my patch on develop or trunk ?
>
>-----Original Message-----
>From: Frédéric THOMAS [mailto:[hidden email]]
>Sent: Friday, October 12, 2012 7:05 PM
>To: [hidden email]
>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: [hidden email]
>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" <[hidden email]> 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: [hidden email]
>> 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" <[hidden email]> 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.viewst
>>> a 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.viewst
>>> a 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:[hidden email]]
>>> Sent: Friday, October 05, 2012 6:42 PM
>>> To: [hidden email]
>>> Subject: Re: Performence issue
>>>
>>> What does the profiler say is going on?
>>>
>>>
>>> On 10/5/12 9:10 AM, "Frédéric THOMAS" <[hidden email]> 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:[hidden email]]
>>>> Sent: Friday, October 05, 2012 5:41 PM
>>>> To: [hidden email]
>>>> 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" <[hidden email]> 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
>
>