You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Frank Dahmen <fr...@dahmenia.de> on 2016/11/28 07:46:03 UTC

reduce creation time of view in mobile app

Hi,
in my app i have a really huge View with lots...lots! of (custom)controls.
When i push this view or pop back to this view it takes several seconds.
On create it makes a remote request and on result it configures the 
controls (adds childs to control, changs states, sets data....)
The remote request itself takes about 700ms which is ok.

When i run the app on the desktop creation time is quite fast, 2 seconds
but on my htc it's  8-10 seconds
What strategies can//I apply to reduce this a bit (3-5 seconds)?
I tried to set destructionPolicy=never, but no real effect
Can I somehow measure what takes how long?

Thanks



Re: Creating Slider in FlexJS

Posted by Peter Ent <pe...@adobe.com>.
We made several bug fixes to the Slider in the FlexJS 0.8.0 version. Can
you grab a nightly build and try that?

Regards,
Peter Ent
Adobe Systems/Apache Flex Project

On 1/5/17, 11:22 PM, "Lane" <la...@hotmail.com> wrote:

>I'm working with Flashbuilder 4.7 and FlexJS 0.7.0 on Windows 10. The
>following code generates a slider on the Run command. However, it does
>not 
>generate a slider when I do a release build. Is there something very
>obvious 
>that I am missing?
>
><js:Slider id="circuitsSlider" width="800" x="20" y="200"
>           minimum="0" maximum="242" snapInterval="1"
>mouseUp="sliderChange()"/>
>
>Thanks so much,
>
>Lane. 
>
>
>---
>This email has been checked for viruses by Avast antivirus software.
>https://www.avast.com/antivirus
>


Creating Slider in FlexJS

Posted by Lane <la...@hotmail.com>.
I'm working with Flashbuilder 4.7 and FlexJS 0.7.0 on Windows 10. The 
following code generates a slider on the Run command. However, it does not 
generate a slider when I do a release build. Is there something very obvious 
that I am missing?

<js:Slider id="circuitsSlider" width="800" x="20" y="200"
           minimum="0" maximum="242" snapInterval="1" 
mouseUp="sliderChange()"/>

Thanks so much,

Lane. 


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
thanks Alex

I will try to figure out if and how I could apply it to this view


Am 28.11.2016 um 23:26 schrieb Alex Harui:
>
> On 11/28/16, 12:49 PM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>
>> this looks like magic :)
>>
>> I'll try to understand the concept
> In fact, it is based on the principles that most professional magicians
> use, such as illusion.  There is probably no requirement in your app to
> create, say, 200 UI widgets at the same time, just to give the illusion
> that you did.  So, once you understand the behavior of the end-user, you
> might be able to create an illusion of creating 200 UI widgets by creating
> the 50 or so that must be on-screen right away, then adding others "later".
>
> In some scenarios, if the user must read something before deciding whether
> to scroll to see the other widgets, you can use that "read" time to make
> the remaining widgets.  In computer time, a human reading something
> usually takes quite a bit time.  But there are other scenarios where the
> user is just as likely to flip to the bottom of the screen, and then you
> have to take that into account.
>
> Also, usually, user interaction takes very little of the frame time in
> Flash.  But doing too much makes the UI poorly-responsive.  So it is
> possible to do little bits of work when the user is interacting, but not
> so much that he/she notices.
>
> The implementation in this FlexStore example uses multiple view states.
> Think of any live theater you've watched where the sets are changing on
> one corner of the stage while the spotlight focuses your attention on two
> people talking in the opposite corner.  The theater director has
> choreographed what backdrops get raised and lowered and when certain
> stagehands carry in some furniture and when the actors arrive at the edge
> of the stage.  The FlexStore example just uses two states, but you could
> use many more if that is what you need to do in order to create all the
> widgets and not make the app unresponsive.
>
> FlexStore waits for a stylesheet to load, but you could wait for
> creationComplete or updateComplete of whatever needs to be on-screen right
> away, then use callLater to change to the next state, where more widgets
> are created, then on updateComplete of those, callLater could switch to
> yet another state.  I use StateGroups so that widgets have an "includeIn"
> of all states after the one they are create in.
>
> FWIW, one of the cool things about FlexJS is that MXML is converted into
> data instead of code, so it would be possible to create a "smart"
> container that only instantiates as many components as it can within an
> interval, then creates more on subsequent intervals. The result would be
> sort of a "reveal effect" if the rate of creation falls behind the user's
> demands.
>
> HTH,
> -Alex
>


Re: Compiler directive

Posted by Lane <la...@hotmail.com>.
That is exactly what I am looking for.

Thanks so much,

Lane.

-----Original Message----- 
From: OmPrakash Muppirala 
Sent: Tuesday, December 6, 2016 1:30 AM 
To: users@flex.apache.org 
Subject: Re: Compiler directive 

I think this is what you are looking for
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50856172

Thanks,
Om

On Dec 4, 2016 10:29 PM, "Lane" <la...@hotmail.com> wrote:

I've got a mobile Android Flex app that is skinned with older mobile
components. I recently updated the app with a newly compiled version and it
has newer skins. For instance, on the tabs there is now a horizontal line.
The spinner wheel has a much lighter shade. I don't like the new washed-out
look.

I think I used a compiler directive before to suppress this, but can't find
a record now of what I did. I'd be grateful if you could help remind me of
what is necessary to move back to the old look.

Thanks,

Lane.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: Compiler directive

Posted by OmPrakash Muppirala <bi...@gmail.com>.
I think this is what you are looking for
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50856172

Thanks,
Om

On Dec 4, 2016 10:29 PM, "Lane" <la...@hotmail.com> wrote:

I've got a mobile Android Flex app that is skinned with older mobile
components. I recently updated the app with a newly compiled version and it
has newer skins. For instance, on the tabs there is now a horizontal line.
The spinner wheel has a much lighter shade. I don't like the new washed-out
look.

I think I used a compiler directive before to suppress this, but can't find
a record now of what I did. I'd be grateful if you could help remind me of
what is necessary to move back to the old look.

Thanks,

Lane.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Compiler directive

Posted by Lane <la...@hotmail.com>.
I've got a mobile Android Flex app that is skinned with older mobile 
components. I recently updated the app with a newly compiled version and it 
has newer skins. For instance, on the tabs there is now a horizontal line. 
The spinner wheel has a much lighter shade. I don't like the new washed-out 
look.

I think I used a compiler directive before to suppress this, but can't find 
a record now of what I did. I'd be grateful if you could help remind me of 
what is necessary to move back to the old look.

Thanks,

Lane. 


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: reduce creation time of view in mobile app

Posted by Alex Harui <ah...@adobe.com>.

On 11/28/16, 12:49 PM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>this looks like magic :)
>
>I'll try to understand the concept

In fact, it is based on the principles that most professional magicians
use, such as illusion.  There is probably no requirement in your app to
create, say, 200 UI widgets at the same time, just to give the illusion
that you did.  So, once you understand the behavior of the end-user, you
might be able to create an illusion of creating 200 UI widgets by creating
the 50 or so that must be on-screen right away, then adding others "later".

In some scenarios, if the user must read something before deciding whether
to scroll to see the other widgets, you can use that "read" time to make
the remaining widgets.  In computer time, a human reading something
usually takes quite a bit time.  But there are other scenarios where the
user is just as likely to flip to the bottom of the screen, and then you
have to take that into account.

Also, usually, user interaction takes very little of the frame time in
Flash.  But doing too much makes the UI poorly-responsive.  So it is
possible to do little bits of work when the user is interacting, but not
so much that he/she notices.

The implementation in this FlexStore example uses multiple view states.
Think of any live theater you've watched where the sets are changing on
one corner of the stage while the spotlight focuses your attention on two
people talking in the opposite corner.  The theater director has
choreographed what backdrops get raised and lowered and when certain
stagehands carry in some furniture and when the actors arrive at the edge
of the stage.  The FlexStore example just uses two states, but you could
use many more if that is what you need to do in order to create all the
widgets and not make the app unresponsive.

FlexStore waits for a stylesheet to load, but you could wait for
creationComplete or updateComplete of whatever needs to be on-screen right
away, then use callLater to change to the next state, where more widgets
are created, then on updateComplete of those, callLater could switch to
yet another state.  I use StateGroups so that widgets have an "includeIn"
of all states after the one they are create in.

FWIW, one of the cool things about FlexJS is that MXML is converted into
data instead of code, so it would be possible to create a "smart"
container that only instantiates as many components as it can within an
interval, then creates more on subsequent intervals. The result would be
sort of a "reveal effect" if the rate of creation falls behind the user's
demands.

HTH,
-Alex


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
this looks like magic :)

I'll try to understand the concept

thanks



Am 28.11.2016 um 17:29 schrieb Alex Harui:
>
> On 11/28/16, 5:57 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>
>> that's why I said "magic" not "unpleasant" :)
> Fundamentally, if it isn't visible on-screen, don't create it right away.
>
> If you look at the FlexStore example here [1]
>
> I've used states and a "prebake" trick to finish up initialization of
> off-screen stuff after the initial screen is visible.
>
> HTH,
> -Alex
>
> [1]
> https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-examples.git;a
> =blob_plain;f=FlexStore/spark/src/FlexStore.mxml;hb=refs/heads/develop
>


Re: reduce creation time of view in mobile app

Posted by Alex Harui <ah...@adobe.com>.

On 11/28/16, 5:57 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>that's why I said "magic" not "unpleasant" :)

Fundamentally, if it isn't visible on-screen, don't create it right away.

If you look at the FlexStore example here [1]

I've used states and a "prebake" trick to finish up initialization of
off-screen stuff after the initial screen is visible.

HTH,
-Alex 

[1] 
https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-examples.git;a
=blob_plain;f=FlexStore/spark/src/FlexStore.mxml;hb=refs/heads/develop


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
that's why I said "magic" not "unpleasant" :)

i measured in release mode:
creationcomplete is fired after ca. 3 - 3.5 sec
than the remote request is started and upon result the controls are 
"configured"
this takes about 1 - 1.2 sec

I think I leave it as it is, and ask the customer if splitting in 
several views would be an option (before diving in the "unpleasant" 
stuff ;))

thanks






Am 28.11.2016 um 14:30 schrieb Vincent:
> It's always a question of requirements, if 5 s is ok for the use case, 
> then may be it is not worth spending too much time on it.
>
> Unfortunately, the only magic technique than I know when it comes to 
> increase performance on mobile (for complexes views a least) is to 
> give up on some of the things that make flex for desktop so powerfull 
> and pleasant to use : mxml, nested containers and data binding.
>
> if destructionpolicy=never didn't help the second time the view is 
> pushed, it's probably a clue that a the invalidation process takes a 
> lot of time.
>
>
>
>
> Le 28/11/2016  13:28, Frank Dahmen a crit :
>> would be over 10000px high ;)
>>
>> but 5 sec. (not in debug mode) is almost ok
>> it IS huge and there is a lot of stuff going on
>> I know, spending some days and revise all components (and make it 
>> more complicated) i could lower it 1,2 seconds...... i guess
>> I thought there are some "magic" techniques, like offscreen rendering 
>> or such.
>> (destructionpolicy=never did not help)
>>
>>
>>
>>
>>
>>
>> Am 28.11.2016 um 12:29 schrieb Vincent:
>>> I said not always ;-)
>>>
>>> can you show a screen capture of the view ?
>>>
>>>
>>> Le 28/11/2016  12:25, Frank Dahmen a crit :
>>>> thanks,
>>>>
>>>> yes, I know, but as you said, not easy
>>>>
>>>>
>>>>
>>>> Am 28.11.2016 um 11:46 schrieb Vincent:
>>>>> Hi,
>>>>>
>>>>> If it takes 2s on desktop, it is very likely that the process will 
>>>>> cost at least twice more on mobile (and probably a lot more on low 
>>>>> end devices)You can set the destructionPolicy property of the View 
>>>>> to never, so the view is just created once, the downside is memory 
>>>>> consumption.
>>>>>
>>>>> The only way to reduce creation time is to simplify the 
>>>>> organization of the controls inside the view : dozens of nested 
>>>>> groups hurts performance very badly. It's not always easy but you 
>>>>> should work on a solution to make the view shallower.
>>>>>
>>>>> Le 28/11/2016  09:43, Frank Dahmen a crit :
>>>>>> Thanks,
>>>>>>
>>>>>> the view is really, really  huge so 2 seconds would be perfect ok
>>>>>>
>>>>>> Yes seperate views would work I guess, but when the view is 
>>>>>> loaded once its's very fast to use
>>>>>> (fast scrolling etc.)
>>>>>> and when switching between views,  the overall "use-time" 
>>>>>> wouldn't be better i think
>>>>>>
>>>>>> ........I am an idiot......just tested in test mode not in debug 
>>>>>> mode (in FlashDevelop)
>>>>>> and now it only takes 5 seconds.......which is almost ok
>>>>>>
>>>>>> but what do you mean with the sections?
>>>>>> as i said, each time the view is created it fetches data from a 
>>>>>> server and configures all controls
>>>>>> yes they are grouped in (visual) sections
>>>>>> so create and configure them but not show them?
>>>>>>
>>>>>> think of the view like a VGroup in a scroller
>>>>>> inside this VGroup are 10 other VGroups and each of them has 10 
>>>>>> Buttons
>>>>>> on result of the remote request each buttons label is set
>>>>>> this is simplified, and sounds like i should use a DataGroup or 
>>>>>> such,
>>>>>> but the controls are all custom, and some have complex functionality
>>>>>>
>>>>>> how to do this "section-lazy-loading"?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>>>>>>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can 
>>>>>>> create
>>>>>>> separate views and load them on demand?  Or is the view completely
>>>>>>> customizable?
>>>>>>>
>>>>>>> Also, on your device, are you running the release build or debug 
>>>>>>> build?
>>>>>>>
>>>>>>> You could also create sections in the View and as each section 
>>>>>>> becomes
>>>>>>> visible, create those children only then.
>>>>>>>
>>>>>>> You can use Adobe Scout to get a better understanding of the 
>>>>>>> bottlenecks in
>>>>>>> your code.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Om
>>>>>>>
>>>>>>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen 
>>>>>>> <fr...@dahmenia.de> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> in my app i have a really huge View with lots...lots! of 
>>>>>>>> (custom)controls.
>>>>>>>> When i push this view or pop back to this view it takes several 
>>>>>>>> seconds.
>>>>>>>> On create it makes a remote request and on result it configures 
>>>>>>>> the
>>>>>>>> controls (adds childs to control, changs states, sets data....)
>>>>>>>> The remote request itself takes about 700ms which is ok.
>>>>>>>>
>>>>>>>> When i run the app on the desktop creation time is quite fast, 
>>>>>>>> 2 seconds
>>>>>>>> but on my htc it's  8-10 seconds
>>>>>>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>>>>>>> I tried to set destructionPolicy=never, but no real effect
>>>>>>>> Can I somehow measure what takes how long?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


Re: reduce creation time of view in mobile app

Posted by Vincent <vi...@after24.net>.
It's always a question of requirements, if 5 s is ok for the use case, 
then may be it is not worth spending too much time on it.

Unfortunately, the only magic technique than I know when it comes to 
increase performance on mobile (for complexes views a least) is to give 
up on some of the things that make flex for desktop so powerfull and 
pleasant to use : mxml, nested containers and data binding.

if destructionpolicy=never didn't help the second time the view is 
pushed, it's probably a clue that a the invalidation process takes a lot 
of time.




Le 28/11/2016  13:28, Frank Dahmen a crit :
> would be over 10000px high ;)
>
> but 5 sec. (not in debug mode) is almost ok
> it IS huge and there is a lot of stuff going on
> I know, spending some days and revise all components (and make it more 
> complicated) i could lower it 1,2 seconds...... i guess
> I thought there are some "magic" techniques, like offscreen rendering 
> or such.
> (destructionpolicy=never did not help)
>
>
>
>
>
>
> Am 28.11.2016 um 12:29 schrieb Vincent:
>> I said not always ;-)
>>
>> can you show a screen capture of the view ?
>>
>>
>> Le 28/11/2016  12:25, Frank Dahmen a crit :
>>> thanks,
>>>
>>> yes, I know, but as you said, not easy
>>>
>>>
>>>
>>> Am 28.11.2016 um 11:46 schrieb Vincent:
>>>> Hi,
>>>>
>>>> If it takes 2s on desktop, it is very likely that the process will 
>>>> cost at least twice more on mobile (and probably a lot more on low 
>>>> end devices)You can set the destructionPolicy property of the View 
>>>> to never, so the view is just created once, the downside is memory 
>>>> consumption.
>>>>
>>>> The only way to reduce creation time is to simplify the 
>>>> organization of the controls inside the view : dozens of nested 
>>>> groups hurts performance very badly. It's not always easy but you 
>>>> should work on a solution to make the view shallower.
>>>>
>>>> Le 28/11/2016  09:43, Frank Dahmen a crit :
>>>>> Thanks,
>>>>>
>>>>> the view is really, really  huge so 2 seconds would be perfect ok
>>>>>
>>>>> Yes seperate views would work I guess, but when the view is loaded 
>>>>> once its's very fast to use
>>>>> (fast scrolling etc.)
>>>>> and when switching between views,  the overall "use-time" wouldn't 
>>>>> be better i think
>>>>>
>>>>> ........I am an idiot......just tested in test mode not in debug 
>>>>> mode (in FlashDevelop)
>>>>> and now it only takes 5 seconds.......which is almost ok
>>>>>
>>>>> but what do you mean with the sections?
>>>>> as i said, each time the view is created it fetches data from a 
>>>>> server and configures all controls
>>>>> yes they are grouped in (visual) sections
>>>>> so create and configure them but not show them?
>>>>>
>>>>> think of the view like a VGroup in a scroller
>>>>> inside this VGroup are 10 other VGroups and each of them has 10 
>>>>> Buttons
>>>>> on result of the remote request each buttons label is set
>>>>> this is simplified, and sounds like i should use a DataGroup or such,
>>>>> but the controls are all custom, and some have complex functionality
>>>>>
>>>>> how to do this "section-lazy-loading"?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>>>>>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can 
>>>>>> create
>>>>>> separate views and load them on demand?  Or is the view completely
>>>>>> customizable?
>>>>>>
>>>>>> Also, on your device, are you running the release build or debug 
>>>>>> build?
>>>>>>
>>>>>> You could also create sections in the View and as each section 
>>>>>> becomes
>>>>>> visible, create those children only then.
>>>>>>
>>>>>> You can use Adobe Scout to get a better understanding of the 
>>>>>> bottlenecks in
>>>>>> your code.
>>>>>>
>>>>>> Thanks,
>>>>>> Om
>>>>>>
>>>>>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen 
>>>>>> <fr...@dahmenia.de> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> in my app i have a really huge View with lots...lots! of 
>>>>>>> (custom)controls.
>>>>>>> When i push this view or pop back to this view it takes several 
>>>>>>> seconds.
>>>>>>> On create it makes a remote request and on result it configures the
>>>>>>> controls (adds childs to control, changs states, sets data....)
>>>>>>> The remote request itself takes about 700ms which is ok.
>>>>>>>
>>>>>>> When i run the app on the desktop creation time is quite fast, 2 
>>>>>>> seconds
>>>>>>> but on my htc it's  8-10 seconds
>>>>>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>>>>>> I tried to set destructionPolicy=never, but no real effect
>>>>>>> Can I somehow measure what takes how long?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>
>>
>


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
would be over 10000px high ;)

but 5 sec. (not in debug mode) is almost ok
it IS huge and there is a lot of stuff going on
I know, spending some days and revise all components (and make it more 
complicated) i could lower it 1,2 seconds...... i guess
I thought there are some "magic" techniques, like offscreen rendering or 
such.
(destructionpolicy=never did not help)






Am 28.11.2016 um 12:29 schrieb Vincent:
> I said not always ;-)
>
> can you show a screen capture of the view ?
>
>
> Le 28/11/2016  12:25, Frank Dahmen a crit :
>> thanks,
>>
>> yes, I know, but as you said, not easy
>>
>>
>>
>> Am 28.11.2016 um 11:46 schrieb Vincent:
>>> Hi,
>>>
>>> If it takes 2s on desktop, it is very likely that the process will 
>>> cost at least twice more on mobile (and probably a lot more on low 
>>> end devices)You can set the destructionPolicy property of the View 
>>> to never, so the view is just created once, the downside is memory 
>>> consumption.
>>>
>>> The only way to reduce creation time is to simplify the organization 
>>> of the controls inside the view : dozens of nested groups hurts 
>>> performance very badly. It's not always easy but you should work on 
>>> a solution to make the view shallower.
>>>
>>> Le 28/11/2016  09:43, Frank Dahmen a crit :
>>>> Thanks,
>>>>
>>>> the view is really, really  huge so 2 seconds would be perfect ok
>>>>
>>>> Yes seperate views would work I guess, but when the view is loaded 
>>>> once its's very fast to use
>>>> (fast scrolling etc.)
>>>> and when switching between views,  the overall "use-time" wouldn't 
>>>> be better i think
>>>>
>>>> ........I am an idiot......just tested in test mode not in debug 
>>>> mode (in FlashDevelop)
>>>> and now it only takes 5 seconds.......which is almost ok
>>>>
>>>> but what do you mean with the sections?
>>>> as i said, each time the view is created it fetches data from a 
>>>> server and configures all controls
>>>> yes they are grouped in (visual) sections
>>>> so create and configure them but not show them?
>>>>
>>>> think of the view like a VGroup in a scroller
>>>> inside this VGroup are 10 other VGroups and each of them has 10 
>>>> Buttons
>>>> on result of the remote request each buttons label is set
>>>> this is simplified, and sounds like i should use a DataGroup or such,
>>>> but the controls are all custom, and some have complex functionality
>>>>
>>>> how to do this "section-lazy-loading"?
>>>>
>>>>
>>>>
>>>>
>>>> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>>>>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
>>>>> separate views and load them on demand?  Or is the view completely
>>>>> customizable?
>>>>>
>>>>> Also, on your device, are you running the release build or debug 
>>>>> build?
>>>>>
>>>>> You could also create sections in the View and as each section 
>>>>> becomes
>>>>> visible, create those children only then.
>>>>>
>>>>> You can use Adobe Scout to get a better understanding of the 
>>>>> bottlenecks in
>>>>> your code.
>>>>>
>>>>> Thanks,
>>>>> Om
>>>>>
>>>>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>> in my app i have a really huge View with lots...lots! of 
>>>>>> (custom)controls.
>>>>>> When i push this view or pop back to this view it takes several 
>>>>>> seconds.
>>>>>> On create it makes a remote request and on result it configures the
>>>>>> controls (adds childs to control, changs states, sets data....)
>>>>>> The remote request itself takes about 700ms which is ok.
>>>>>>
>>>>>> When i run the app on the desktop creation time is quite fast, 2 
>>>>>> seconds
>>>>>> but on my htc it's  8-10 seconds
>>>>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>>>>> I tried to set destructionPolicy=never, but no real effect
>>>>>> Can I somehow measure what takes how long?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>


Re: reduce creation time of view in mobile app

Posted by Vincent <vi...@after24.net>.
I said not always ;-)

can you show a screen capture of the view ?


Le 28/11/2016  12:25, Frank Dahmen a crit :
> thanks,
>
> yes, I know, but as you said, not easy
>
>
>
> Am 28.11.2016 um 11:46 schrieb Vincent:
>> Hi,
>>
>> If it takes 2s on desktop, it is very likely that the process will 
>> cost at least twice more on mobile (and probably a lot more on low 
>> end devices)You can set the destructionPolicy property of the View to 
>> never, so the view is just created once, the downside is memory 
>> consumption.
>>
>> The only way to reduce creation time is to simplify the organization 
>> of the controls inside the view : dozens of nested groups hurts 
>> performance very badly. It's not always easy but you should work on a 
>> solution to make the view shallower.
>>
>> Le 28/11/2016  09:43, Frank Dahmen a crit :
>>> Thanks,
>>>
>>> the view is really, really  huge so 2 seconds would be perfect ok
>>>
>>> Yes seperate views would work I guess, but when the view is loaded 
>>> once its's very fast to use
>>> (fast scrolling etc.)
>>> and when switching between views,  the overall "use-time" wouldn't 
>>> be better i think
>>>
>>> ........I am an idiot......just tested in test mode not in debug 
>>> mode (in FlashDevelop)
>>> and now it only takes 5 seconds.......which is almost ok
>>>
>>> but what do you mean with the sections?
>>> as i said, each time the view is created it fetches data from a 
>>> server and configures all controls
>>> yes they are grouped in (visual) sections
>>> so create and configure them but not show them?
>>>
>>> think of the view like a VGroup in a scroller
>>> inside this VGroup are 10 other VGroups and each of them has 10 Buttons
>>> on result of the remote request each buttons label is set
>>> this is simplified, and sounds like i should use a DataGroup or such,
>>> but the controls are all custom, and some have complex functionality
>>>
>>> how to do this "section-lazy-loading"?
>>>
>>>
>>>
>>>
>>> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>>>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
>>>> separate views and load them on demand?  Or is the view completely
>>>> customizable?
>>>>
>>>> Also, on your device, are you running the release build or debug 
>>>> build?
>>>>
>>>> You could also create sections in the View and as each section becomes
>>>> visible, create those children only then.
>>>>
>>>> You can use Adobe Scout to get a better understanding of the 
>>>> bottlenecks in
>>>> your code.
>>>>
>>>> Thanks,
>>>> Om
>>>>
>>>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> in my app i have a really huge View with lots...lots! of 
>>>>> (custom)controls.
>>>>> When i push this view or pop back to this view it takes several 
>>>>> seconds.
>>>>> On create it makes a remote request and on result it configures the
>>>>> controls (adds childs to control, changs states, sets data....)
>>>>> The remote request itself takes about 700ms which is ok.
>>>>>
>>>>> When i run the app on the desktop creation time is quite fast, 2 
>>>>> seconds
>>>>> but on my htc it's  8-10 seconds
>>>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>>>> I tried to set destructionPolicy=never, but no real effect
>>>>> Can I somehow measure what takes how long?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>
>>
>


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
thanks,

yes, I know, but as you said, not easy



Am 28.11.2016 um 11:46 schrieb Vincent:
> Hi,
>
> If it takes 2s on desktop, it is very likely that the process will 
> cost at least twice more on mobile (and probably a lot more on low end 
> devices)You can set the destructionPolicy property of the View to 
> never, so the view is just created once, the downside is memory 
> consumption.
>
> The only way to reduce creation time is to simplify the organization 
> of the controls inside the view : dozens of nested groups hurts 
> performance very badly. It's not always easy but you should work on a 
> solution to make the view shallower.
>
> Le 28/11/2016  09:43, Frank Dahmen a crit :
>> Thanks,
>>
>> the view is really, really  huge so 2 seconds would be perfect ok
>>
>> Yes seperate views would work I guess, but when the view is loaded 
>> once its's very fast to use
>> (fast scrolling etc.)
>> and when switching between views,  the overall "use-time" wouldn't be 
>> better i think
>>
>> ........I am an idiot......just tested in test mode not in debug mode 
>> (in FlashDevelop)
>> and now it only takes 5 seconds.......which is almost ok
>>
>> but what do you mean with the sections?
>> as i said, each time the view is created it fetches data from a 
>> server and configures all controls
>> yes they are grouped in (visual) sections
>> so create and configure them but not show them?
>>
>> think of the view like a VGroup in a scroller
>> inside this VGroup are 10 other VGroups and each of them has 10 Buttons
>> on result of the remote request each buttons label is set
>> this is simplified, and sounds like i should use a DataGroup or such,
>> but the controls are all custom, and some have complex functionality
>>
>> how to do this "section-lazy-loading"?
>>
>>
>>
>>
>> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
>>> separate views and load them on demand?  Or is the view completely
>>> customizable?
>>>
>>> Also, on your device, are you running the release build or debug build?
>>>
>>> You could also create sections in the View and as each section becomes
>>> visible, create those children only then.
>>>
>>> You can use Adobe Scout to get a better understanding of the 
>>> bottlenecks in
>>> your code.
>>>
>>> Thanks,
>>> Om
>>>
>>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> 
>>> wrote:
>>>
>>>> Hi,
>>>> in my app i have a really huge View with lots...lots! of 
>>>> (custom)controls.
>>>> When i push this view or pop back to this view it takes several 
>>>> seconds.
>>>> On create it makes a remote request and on result it configures the
>>>> controls (adds childs to control, changs states, sets data....)
>>>> The remote request itself takes about 700ms which is ok.
>>>>
>>>> When i run the app on the desktop creation time is quite fast, 2 
>>>> seconds
>>>> but on my htc it's  8-10 seconds
>>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>>> I tried to set destructionPolicy=never, but no real effect
>>>> Can I somehow measure what takes how long?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>
>


Re: reduce creation time of view in mobile app

Posted by Vincent <vi...@after24.net>.
Hi,

If it takes 2s on desktop, it is very likely that the process will cost 
at least twice more on mobile (and probably a lot more on low end 
devices)You can set the destructionPolicy property of the View to never, 
so the view is just created once, the downside is memory consumption.

The only way to reduce creation time is to simplify the organization of 
the controls inside the view : dozens of nested groups hurts performance 
very badly. It's not always easy but you should work on a solution to 
make the view shallower.

Le 28/11/2016  09:43, Frank Dahmen a crit :
> Thanks,
>
> the view is really, really  huge so 2 seconds would be perfect ok
>
> Yes seperate views would work I guess, but when the view is loaded 
> once its's very fast to use
> (fast scrolling etc.)
> and when switching between views,  the overall "use-time" wouldn't be 
> better i think
>
> ........I am an idiot......just tested in test mode not in debug mode 
> (in FlashDevelop)
> and now it only takes 5 seconds.......which is almost ok
>
> but what do you mean with the sections?
> as i said, each time the view is created it fetches data from a server 
> and configures all controls
> yes they are grouped in (visual) sections
> so create and configure them but not show them?
>
> think of the view like a VGroup in a scroller
> inside this VGroup are 10 other VGroups and each of them has 10 Buttons
> on result of the remote request each buttons label is set
> this is simplified, and sounds like i should use a DataGroup or such,
> but the controls are all custom, and some have complex functionality
>
> how to do this "section-lazy-loading"?
>
>
>
>
> Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
>> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
>> separate views and load them on demand?  Or is the view completely
>> customizable?
>>
>> Also, on your device, are you running the release build or debug build?
>>
>> You could also create sections in the View and as each section becomes
>> visible, create those children only then.
>>
>> You can use Adobe Scout to get a better understanding of the 
>> bottlenecks in
>> your code.
>>
>> Thanks,
>> Om
>>
>> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> 
>> wrote:
>>
>>> Hi,
>>> in my app i have a really huge View with lots...lots! of 
>>> (custom)controls.
>>> When i push this view or pop back to this view it takes several 
>>> seconds.
>>> On create it makes a remote request and on result it configures the
>>> controls (adds childs to control, changs states, sets data....)
>>> The remote request itself takes about 700ms which is ok.
>>>
>>> When i run the app on the desktop creation time is quite fast, 2 
>>> seconds
>>> but on my htc it's  8-10 seconds
>>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>>> I tried to set destructionPolicy=never, but no real effect
>>> Can I somehow measure what takes how long?
>>>
>>> Thanks
>>>
>>>
>>>
>


Re: reduce creation time of view in mobile app

Posted by Frank Dahmen <fr...@dahmenia.de>.
Thanks,

the view is really, really  huge so 2 seconds would be perfect ok

Yes seperate views would work I guess, but when the view is loaded once 
its's very fast to use
(fast scrolling etc.)
and when switching between views,  the overall "use-time" wouldn't be 
better i think

........I am an idiot......just tested in test mode not in debug mode 
(in FlashDevelop)
and now it only takes 5 seconds.......which is almost ok

but what do you mean with the sections?
as i said, each time the view is created it fetches data from a server 
and configures all controls
yes they are grouped in (visual) sections
so create and configure them but not show them?

think of the view like a VGroup in a scroller
inside this VGroup are 10 other VGroups and each of them has 10 Buttons
on result of the remote request each buttons label is set
this is simplified, and sounds like i should use a DataGroup or such,
but the controls are all custom, and some have complex functionality

how to do this "section-lazy-loading"?




Am 28.11.2016 um 09:00 schrieb OmPrakash Muppirala:
> Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
> separate views and load them on demand?  Or is the view completely
> customizable?
>
> Also, on your device, are you running the release build or debug build?
>
> You could also create sections in the View and as each section becomes
> visible, create those children only then.
>
> You can use Adobe Scout to get a better understanding of the bottlenecks in
> your code.
>
> Thanks,
> Om
>
> On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> wrote:
>
>> Hi,
>> in my app i have a really huge View with lots...lots! of (custom)controls.
>> When i push this view or pop back to this view it takes several seconds.
>> On create it makes a remote request and on result it configures the
>> controls (adds childs to control, changs states, sets data....)
>> The remote request itself takes about 700ms which is ok.
>>
>> When i run the app on the desktop creation time is quite fast, 2 seconds
>> but on my htc it's  8-10 seconds
>> What strategies can//I apply to reduce this a bit (3-5 seconds)?
>> I tried to set destructionPolicy=never, but no real effect
>> Can I somehow measure what takes how long?
>>
>> Thanks
>>
>>
>>


Re: reduce creation time of view in mobile app

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Hmm, 2 seconds on a desktop is quite slow :-(  Perhaps you can create
separate views and load them on demand?  Or is the view completely
customizable?

Also, on your device, are you running the release build or debug build?

You could also create sections in the View and as each section becomes
visible, create those children only then.

You can use Adobe Scout to get a better understanding of the bottlenecks in
your code.

Thanks,
Om

On Sun, Nov 27, 2016 at 11:46 PM, Frank Dahmen <fr...@dahmenia.de> wrote:

> Hi,
> in my app i have a really huge View with lots...lots! of (custom)controls.
> When i push this view or pop back to this view it takes several seconds.
> On create it makes a remote request and on result it configures the
> controls (adds childs to control, changs states, sets data....)
> The remote request itself takes about 700ms which is ok.
>
> When i run the app on the desktop creation time is quite fast, 2 seconds
> but on my htc it's  8-10 seconds
> What strategies can//I apply to reduce this a bit (3-5 seconds)?
> I tried to set destructionPolicy=never, but no real effect
> Can I somehow measure what takes how long?
>
> Thanks
>
>
>