You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Gabriele Campi [Media Logic]" <ga...@medialogic.eu> on 2014/04/02 10:05:53 UTC

Coding a better flex mobile app

Hi,

last year I created a mobile app for IOS and Android using Apache Flex.

My app uses a SQLite database and makes large use of graphics and 
bitmapdata (being a design app that manipulates images) and I 
encountered many problems with general performances and memory 
management. My app now is heavy and slow.
It was my first project with Flex and Air technologies, and now it's 
time to clear, improve, rewrite the code. What would be the better approach?

Just to test performances I created an Hello World app in Objective-C, 
AS3 and Flex, just a pair of views with a few buttons, and the Flex one 
was dramatically slow and heavy compared with the others.

There are many opportunity out there (MVC frameworks like Robotlegs and 
PureMVC, or pure AS3 solutions like MadComponents), could they be a 
viable alternative?

Thanks

Gabriele

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hi Gabriele,

Feather UI works on top of the Starling framework, I use it to for the user
interface.
Robotlegs and AS3 signal helps me to implement MVC architecture.
For handling remote operations I use rpc.swc (wich has a dependency with
framework.swc) of the flex framework.

You can find documentation and tutorials on the Robotlegs (
http://www.robotlegs.org/ <http://www.robotlegs.org/>  ) and Feather UI (
http://feathersui.com/ <http://feathersui.com/>  ) websites.


  

Gabriele Campi [Media Logic] wrote
>> But for now I’m forced to choose other solutions to get a fluid mobile
>> app,
>> to be specific I use :
>>
>> - Starling
>> - Feather UI
>> - Robotleg
>> - AS3 signal
> So you're using Starling and FeatherUI for the interface and Robotleg 
> for the data handling?
> Is it possible to do the same with Flex instead of RL? Are there 
> tutorials or documentation on the web?





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5916.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by "Gabriele Campi [Media Logic]" <ga...@medialogic.eu>.
> But for now I’m forced to choose other solutions to get a fluid mobile app,
> to be specific I use :
>
> - Starling
> - Feather UI
> - Robotleg
> - AS3 signal
So you're using Starling and FeatherUI for the interface and Robotleg 
for the data handling?
Is it possible to do the same with Flex instead of RL? Are there 
tutorials or documentation on the web?



Re: Coding a better flex mobile app

Posted by Gary Yang <fl...@gmail.com>.
"14 000 lines of codes for UIComponent" is not only hurting the
performance, but also scare developers away from looking into it, the 1st
version of Flex was 2004, and the architecture has not been
changed essentially: everything jammed together.

When I looked into Java Spring Framework's growth, especially from Spring2
to Spring3, modularization gives developer great freedom to choose which
feature/function/module to use.

I try to build a pure data model with IList to drive a pure AS UI, I can't
exclude all the UI component from Flex!!, it's like Windows and Explore,
except not really.

Thanks.

-Gary





On Wed, Apr 2, 2014 at 10:50 AM, Alex Harui <ah...@adobe.com> wrote:

> It will be interesting to see if FlexJS on mobile is faster.  Peter is
> working on a mobile app right now.
>
> -Alex
> ________________________________________
> From: After24 [vincent@after24.net]
> Sent: Wednesday, April 2, 2014 3:12 AM
> To: users@flex.apache.org
> Subject: Re: Coding a better flex mobile app
>
> Hello,
>
> From my personal experience, it's not possible to get a super fluid app
> using flex mobile (especially on mid range phones and tablets). I think
> this
> perception is mainly due to the list component which never reaches 50/60
> fps
> even when its itemRender is well optimized.
>
> I know that this need of smoothness is very subjective, but for me it's
> essential and greatly improves the user experience and the pleasure to use
> an app.
> I understand that the flex framework wasn't originally designed to run on
> mobile devices and that optimizations are limited because of the
> architecture of the framework (14 000 lines of codes for UIComponent for
> example). I'm absolutely not complaining about it and the situation is
> going
> better and better with new generations of mobile devices.
>
> But for now I'm forced to choose other solutions to get a fluid mobile app,
> to be specific I use :
>
> - Starling
> - Feather UI
> - Robotleg
> - AS3 signal
>
> I'm very happy with the result but frankly, the choice between this stack
> and flex will be a no brainer if flex was able to perform as well on
> mobile.
> This is the trap with flex, it's so good and easy to develop with it that
> others solutions, even if they works well, are very far from approaching
> the
> ease of working with flex :-)
>
> One more time, it's not a criticism, I'm absolutely not complaining, it's
> just my personal opinion about flex on mobile.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Alex Harui <ah...@adobe.com>.
It will be interesting to see if FlexJS on mobile is faster.  Peter is working on a mobile app right now.

-Alex
________________________________________
From: After24 [vincent@after24.net]
Sent: Wednesday, April 2, 2014 3:12 AM
To: users@flex.apache.org
Subject: Re: Coding a better flex mobile app

Hello,

>From my personal experience, it's not possible to get a super fluid app
using flex mobile (especially on mid range phones and tablets). I think this
perception is mainly due to the list component which never reaches 50/60 fps
even when its itemRender is well optimized.

I know that this need of smoothness is very subjective, but for me it’s
essential and greatly improves the user experience and the pleasure to use
an app.
I understand that the flex framework wasn’t originally designed to run on
mobile devices and that optimizations are limited because of the
architecture of the framework (14 000 lines of codes for UIComponent for
example). I’m absolutely not complaining about it and the situation is going
better and better with new generations of mobile devices.

But for now I’m forced to choose other solutions to get a fluid mobile app,
to be specific I use :

- Starling
- Feather UI
- Robotleg
- AS3 signal

I’m very happy with the result but frankly, the choice between this stack
and flex will be a no brainer if flex was able to perform as well on mobile.
This is the trap with flex, it’s so good and easy to develop with it that
others solutions, even if they works well, are very far from approaching the
ease of working with flex :-)

One more time, it’s not a criticism, I’m absolutely not complaining, it’s
just my personal opinion about flex on mobile.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Maurice Amsellem <ma...@systar.com>.
Reading from wikipedia on this topic (http://en.wikipedia.org/wiki/Frame_rate)

It seems that it's not the frame rate itself that is important for creating a "fluid" animation, but rather motion blurring, which is something natural when you film moving real objects with a camera, and which can be simulated in 3D movies.

So I guess that running an app at 60 fps will create some sort of basic motion blurring by mixing two images into one (at least for the eye).  

The other important factor for fluidity is the latency, which can be bad even at high frame rates.

Thoughts?

Maurice 

-----Message d'origine-----
De : Maurice Amsellem [mailto:maurice.amsellem@systar.com] 
Envoyé : mercredi 2 avril 2014 12:27
À : users@flex.apache.org
Objet : RE: Coding a better flex mobile app

>I think this perception is mainly due to the list component which never reaches 50/60 fps even when its itemRender is well optimized.

I thought the eye perception was limited to 24/25 fps (which is the frame rate at the movies)

So what's the difference ?

Maurice 

-----Message d'origine-----
De : After24 [mailto:vincent@after24.net] Envoyé : mercredi 2 avril 2014 12:13 À : users@flex.apache.org Objet : Re: Coding a better flex mobile app

Hello,

From my personal experience, it's not possible to get a super fluid app using flex mobile (especially on mid range phones and tablets). I think this perception is mainly due to the list component which never reaches 50/60 fps even when its itemRender is well optimized.

I know that this need of smoothness is very subjective, but for me it’s essential and greatly improves the user experience and the pleasure to use an app.
I understand that the flex framework wasn’t originally designed to run on mobile devices and that optimizations are limited because of the architecture of the framework (14 000 lines of codes for UIComponent for example). I’m absolutely not complaining about it and the situation is going better and better with new generations of mobile devices.

But for now I’m forced to choose other solutions to get a fluid mobile app, to be specific I use :

- Starling
- Feather UI
- Robotleg
- AS3 signal

I’m very happy with the result but frankly, the choice between this stack and flex will be a no brainer if flex was able to perform as well on mobile.
This is the trap with flex, it’s so good and easy to develop with it that others solutions, even if they works well, are very far from approaching the ease of working with flex :-)

One more time, it’s not a criticism, I’m absolutely not complaining, it’s just my personal opinion about flex on mobile.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Maurice,

I only have access to the abstract of the study.
2 more links (in french) on the subject :

http://www.nofrag.com/2003/nov/24/8629/
<http://www.nofrag.com/2003/nov/24/8629/>  
http://www.lefigaro.fr/cinema/2012/12/13/03002-20121213ARTFIG00653--bilbo-le-hobbit-la-revolution-des-48-images-par-seconde.php
<http://www.lefigaro.fr/cinema/2012/12/13/03002-20121213ARTFIG00653--bilbo-le-hobbit-la-revolution-des-48-images-par-seconde.php>  

Yes, motion blur helps a lot to smoothen movement perception (we used tricks
based on photoshop blurred image to get smooth animations on flash websites
14 years ago) but applying a blur effect on a list, with a blur amount
depending on scroll speed is likely to kill performance.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5905.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Maurice Amsellem <ma...@systar.com>.
I am interested, but the article cannot be downloaded from the link.  Is it a paying service ?

Maurice 

-----Message d'origine-----
De : After24 [mailto:vincent@after24.net] 
Envoyé : mercredi 2 avril 2014 12:41
À : users@flex.apache.org
Objet : RE: Coding a better flex mobile app

Hi Maurice,

No that's not true,

The 24 fps limit is a misconception. In fact some studies shows that the amelioration of movements perception by human eyes can be improve until 120 fps ( http://onlinelibrary.wiley.com/doi/10.1889/1.2433276/abstract
<http://onlinelibrary.wiley.com/doi/10.1889/1.2433276/abstract>  )



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5898.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hi Maurice,

No that's not true,

The 24 fps limit is a misconception. In fact some studies shows that the
amelioration of movements perception by human eyes can be improve until 120
fps ( http://onlinelibrary.wiley.com/doi/10.1889/1.2433276/abstract
<http://onlinelibrary.wiley.com/doi/10.1889/1.2433276/abstract>  )



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5898.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Maurice Amsellem <ma...@systar.com>.
>I think this perception is mainly due to the list component which never reaches 50/60 fps even when its itemRender is well optimized.

I thought the eye perception was limited to 24/25 fps (which is the frame rate at the movies)

So what's the difference ?

Maurice 

-----Message d'origine-----
De : After24 [mailto:vincent@after24.net] 
Envoyé : mercredi 2 avril 2014 12:13
À : users@flex.apache.org
Objet : Re: Coding a better flex mobile app

Hello,

From my personal experience, it's not possible to get a super fluid app using flex mobile (especially on mid range phones and tablets). I think this perception is mainly due to the list component which never reaches 50/60 fps even when its itemRender is well optimized.

I know that this need of smoothness is very subjective, but for me it’s essential and greatly improves the user experience and the pleasure to use an app.
I understand that the flex framework wasn’t originally designed to run on mobile devices and that optimizations are limited because of the architecture of the framework (14 000 lines of codes for UIComponent for example). I’m absolutely not complaining about it and the situation is going better and better with new generations of mobile devices.

But for now I’m forced to choose other solutions to get a fluid mobile app, to be specific I use :

- Starling
- Feather UI
- Robotleg
- AS3 signal

I’m very happy with the result but frankly, the choice between this stack and flex will be a no brainer if flex was able to perform as well on mobile.
This is the trap with flex, it’s so good and easy to develop with it that others solutions, even if they works well, are very far from approaching the ease of working with flex :-)

One more time, it’s not a criticism, I’m absolutely not complaining, it’s just my personal opinion about flex on mobile.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Ok, since you said "the list component never reaches 50/60 fps even when
its itemRender is well optimized", I though the purpose was to reach the
highest possible performance, not to study the different parameters.

If so, your code is perfectly ok (expect for the assignment of a boolean to
opaqueBackground :)

And yes, "LabelItemRenderer label is *BASED* on StyleableTextField", but
does a thousand things more that you don't really need :) But again, if
you're not trying to prove that you don't really need 4 different
frameworks to get a decently fluid app, it's ok.

Cheers! :)


On Tue, Apr 8, 2014 at 4:03 PM, After24 <vi...@after24.net> wrote:

> I'm sorry Javier but I don't understand your response, would you please be
> more specific.
>
> << NOT using labelitemrenderer, but StyleableTextField directly >>
>
> What do you mean ?  the LabelItemRenderer label is based on
> StyleableTextField. In fact I use this framework class because it's written
> in AS3 (not MXLM) and very well optimized. The autoDrawBackground property
> is not used in this particular ItemRenderer (and commenting the
> drawBackground call in the updateDisplayList method doesn't seem to improve
> performance significantly).
>
> Concerning the fps monitor, I agree that I could have used a more simple
> process but this one is handy and it's not the update method (< 1ms in
> scout) which degrades performance. By the way the purpose of this test is
> not to get the highest fps possible but to study the effect of different
> parameters on the list scrolling performance.
>
>
>
>
> Javier Guerrero García wrote
> > I'm talking about:
> >
> > 1. NOT using labelitemrenderer, but StyleableTextField directly
> > 2. Setting the opaqueBackground property to anything (btw, it's a uint
> > color, not a boolean :)
> > 3. Setting the autoDrawBackground to false
> > 4. And yes, in the new custom itemrenderer, set cacheAsBitmap to true
> >
> > All of that with rendermode=direct, in a ONE plain file, without two
> > thousand packages and classes and functions and setters and getters, and
> > avoiding setting CSS styles and rendering htmlText, converting colors to
> > hex strings, managing LoremIpsums, and so on... EACH time you calculate
> > the
> > FPS :)
> >
> > 4-5 tags in ONE plain MXML file would be more than enough for such
> > benchmark :) Max 1-2k's uncompressed :)
> >
> >
> > On Mon, Apr 7, 2014 at 5:01 PM, After24 &lt;
>
> > vincent@
>
> > &gt; wrote:
> >
> >> You have a very single way to communicate, anyway...
> >>
> >> When you say : "wait until you enable caching and disable backgrounds ;)
> >> "
> >> are you talking about the cacheAsBitmap property ? if it's the case I'm
> >> just
> >> saying that this property is set to true in the constructor of the
> >> LabeItemRenderer.
> >>
> >> And why are you talking about a 300k component ? it's only 150 loc.
> >>
> >>
> >> Javier Guerrero García wrote
> >> > Questioning.stop();
> >> > Trying.start();
> >> >
> >> > ;)
> >> >
> >> > And you should use stagetext instead, but thats just my opinion ;)
> >> >
> >> > El lunes, 7 de abril de 2014, After24 &lt;
> >>
> >> > vincent@
> >>
> >> > &gt; escribió:
> >> >
> >> >> I don't understand is this not the already the case with the
> >> >> LabelItemRenderer ? (cacheAsBitmap is set to true in the
> constructor).
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Javier Guerrero García wrote
> >> >> > :) wait until you enable caching and disable backgrounds ;)
> >> >> >
> >> >> > El lunes, 7 de abril de 2014, After24 &lt;
> >> >>
> >> >> > vincent@
> >> >>
> >> >> > &gt; escribió:
> >> >> >
> >> >> >> Javier,
> >> >> >>
> >> >> >> Setting renderMode to direct has a significant impact, scrolling
> >> fps
> >> >> is
> >> >> >> now
> >> >> >> comprise between 40 and 46 fps.
> >> >> >> I'm using The spark LabelItemRenderer which is based on
> >> >> >> StyleableTextField
> >> >> >> for the label.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
> >> >> >> Sent from the Apache Flex Users mailing list archive at
> Nabble.com.
> >> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
> >> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6062.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6073.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
I’m sorry Javier but I don’t understand your response, would you please be
more specific.

« NOT using labelitemrenderer, but StyleableTextField directly »

What do you mean ?  the LabelItemRenderer label is based on
StyleableTextField. In fact I use this framework class because it’s written
in AS3 (not MXLM) and very well optimized. The autoDrawBackground property
is not used in this particular ItemRenderer (and commenting the
drawBackground call in the updateDisplayList method doesn’t seem to improve
performance significantly).

Concerning the fps monitor, I agree that I could have used a more simple
process but this one is handy and it’s not the update method (< 1ms in
scout) which degrades performance. By the way the purpose of this test is
not to get the highest fps possible but to study the effect of different
parameters on the list scrolling performance.




Javier Guerrero García wrote
> I'm talking about:
> 
> 1. NOT using labelitemrenderer, but StyleableTextField directly
> 2. Setting the opaqueBackground property to anything (btw, it's a uint
> color, not a boolean :)
> 3. Setting the autoDrawBackground to false
> 4. And yes, in the new custom itemrenderer, set cacheAsBitmap to true
> 
> All of that with rendermode=direct, in a ONE plain file, without two
> thousand packages and classes and functions and setters and getters, and
> avoiding setting CSS styles and rendering htmlText, converting colors to
> hex strings, managing LoremIpsums, and so on... EACH time you calculate
> the
> FPS :)
> 
> 4-5 tags in ONE plain MXML file would be more than enough for such
> benchmark :) Max 1-2k's uncompressed :)
> 
> 
> On Mon, Apr 7, 2014 at 5:01 PM, After24 &lt;

> vincent@

> &gt; wrote:
> 
>> You have a very single way to communicate, anyway...
>>
>> When you say : "wait until you enable caching and disable backgrounds ;)
>> "
>> are you talking about the cacheAsBitmap property ? if it's the case I'm
>> just
>> saying that this property is set to true in the constructor of the
>> LabeItemRenderer.
>>
>> And why are you talking about a 300k component ? it's only 150 loc.
>>
>>
>> Javier Guerrero García wrote
>> > Questioning.stop();
>> > Trying.start();
>> >
>> > ;)
>> >
>> > And you should use stagetext instead, but thats just my opinion ;)
>> >
>> > El lunes, 7 de abril de 2014, After24 &lt;
>>
>> > vincent@
>>
>> > &gt; escribió:
>> >
>> >> I don't understand is this not the already the case with the
>> >> LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).
>> >>
>> >>
>> >>
>> >>
>> >> Javier Guerrero García wrote
>> >> > :) wait until you enable caching and disable backgrounds ;)
>> >> >
>> >> > El lunes, 7 de abril de 2014, After24 &lt;
>> >>
>> >> > vincent@
>> >>
>> >> > &gt; escribió:
>> >> >
>> >> >> Javier,
>> >> >>
>> >> >> Setting renderMode to direct has a significant impact, scrolling
>> fps
>> >> is
>> >> >> now
>> >> >> comprise between 40 and 46 fps.
>> >> >> I'm using The spark LabelItemRenderer which is based on
>> >> >> StyleableTextField
>> >> >> for the label.
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
>> >> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
>> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6062.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6073.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
I'm talking about:

1. NOT using labelitemrenderer, but StyleableTextField directly
2. Setting the opaqueBackground property to anything (btw, it's a uint
color, not a boolean :)
3. Setting the autoDrawBackground to false
4. And yes, in the new custom itemrenderer, set cacheAsBitmap to true

All of that with rendermode=direct, in a ONE plain file, without two
thousand packages and classes and functions and setters and getters, and
avoiding setting CSS styles and rendering htmlText, converting colors to
hex strings, managing LoremIpsums, and so on... EACH time you calculate the
FPS :)

4-5 tags in ONE plain MXML file would be more than enough for such
benchmark :) Max 1-2k's uncompressed :)


On Mon, Apr 7, 2014 at 5:01 PM, After24 <vi...@after24.net> wrote:

> You have a very single way to communicate, anyway...
>
> When you say : "wait until you enable caching and disable backgrounds ;) "
> are you talking about the cacheAsBitmap property ? if it's the case I'm
> just
> saying that this property is set to true in the constructor of the
> LabeItemRenderer.
>
> And why are you talking about a 300k component ? it's only 150 loc.
>
>
> Javier Guerrero García wrote
> > Questioning.stop();
> > Trying.start();
> >
> > ;)
> >
> > And you should use stagetext instead, but thats just my opinion ;)
> >
> > El lunes, 7 de abril de 2014, After24 &lt;
>
> > vincent@
>
> > &gt; escribió:
> >
> >> I don't understand is this not the already the case with the
> >> LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).
> >>
> >>
> >>
> >>
> >> Javier Guerrero García wrote
> >> > :) wait until you enable caching and disable backgrounds ;)
> >> >
> >> > El lunes, 7 de abril de 2014, After24 &lt;
> >>
> >> > vincent@
> >>
> >> > &gt; escribió:
> >> >
> >> >> Javier,
> >> >>
> >> >> Setting renderMode to direct has a significant impact, scrolling fps
> >> is
> >> >> now
> >> >> comprise between 40 and 46 fps.
> >> >> I'm using The spark LabelItemRenderer which is based on
> >> >> StyleableTextField
> >> >> for the label.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
> >> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6062.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
You have a very single way to communicate, anyway...

When you say : "wait until you enable caching and disable backgrounds ;) " 
are you talking about the cacheAsBitmap property ? if it's the case I'm just
saying that this property is set to true in the constructor of the
LabeItemRenderer.

And why are you talking about a 300k component ? it's only 150 loc. 


Javier Guerrero García wrote
> Questioning.stop();
> Trying.start();
> 
> ;)
> 
> And you should use stagetext instead, but thats just my opinion ;)
> 
> El lunes, 7 de abril de 2014, After24 &lt;

> vincent@

> &gt; escribió:
> 
>> I don't understand is this not the already the case with the
>> LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).
>>
>>
>>
>>
>> Javier Guerrero García wrote
>> > :) wait until you enable caching and disable backgrounds ;)
>> >
>> > El lunes, 7 de abril de 2014, After24 &lt;
>>
>> > vincent@
>>
>> > &gt; escribió:
>> >
>> >> Javier,
>> >>
>> >> Setting renderMode to direct has a significant impact, scrolling fps
>> is
>> >> now
>> >> comprise between 40 and 46 fps.
>> >> I'm using The spark LabelItemRenderer which is based on
>> >> StyleableTextField
>> >> for the label.
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
>> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6062.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
...and never use a 300k component to do a division ;)

Set a counter
On enterframe, counter++
Set a timer each 5 secs
On timer tick, {fps=counter/5;reset counter}

El lunes, 7 de abril de 2014, Javier Guerrero García <ja...@gmail.com>
escribió:

> Questioning.stop();
> Trying.start();
>
> ;)
>
> And you should use stagetext instead, but thats just my opinion ;)
>
> El lunes, 7 de abril de 2014, After24 <vincent@after24.net<javascript:_e(%7B%7D,'cvml','vincent@after24.net');>>
> escribió:
>
>> I don't understand is this not the already the case with the
>> LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).
>>
>>
>>
>>
>> Javier Guerrero García wrote
>> > :) wait until you enable caching and disable backgrounds ;)
>> >
>> > El lunes, 7 de abril de 2014, After24 &lt;
>>
>> > vincent@
>>
>> > &gt; escribió:
>> >
>> >> Javier,
>> >>
>> >> Setting renderMode to direct has a significant impact, scrolling fps is
>> >> now
>> >> comprise between 40 and 46 fps.
>> >> I'm using The spark LabelItemRenderer which is based on
>> >> StyleableTextField
>> >> for the label.
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
>> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Questioning.stop();
Trying.start();

;)

And you should use stagetext instead, but thats just my opinion ;)

El lunes, 7 de abril de 2014, After24 <vi...@after24.net> escribió:

> I don't understand is this not the already the case with the
> LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).
>
>
>
>
> Javier Guerrero García wrote
> > :) wait until you enable caching and disable backgrounds ;)
> >
> > El lunes, 7 de abril de 2014, After24 &lt;
>
> > vincent@
>
> > &gt; escribió:
> >
> >> Javier,
> >>
> >> Setting renderMode to direct has a significant impact, scrolling fps is
> >> now
> >> comprise between 40 and 46 fps.
> >> I'm using The spark LabelItemRenderer which is based on
> >> StyleableTextField
> >> for the label.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
I don't understand is this not the already the case with the
LabelItemRenderer ? (cacheAsBitmap is set to true in the constructor).




Javier Guerrero García wrote
> :) wait until you enable caching and disable backgrounds ;)
> 
> El lunes, 7 de abril de 2014, After24 &lt;

> vincent@

> &gt; escribió:
> 
>> Javier,
>>
>> Setting renderMode to direct has a significant impact, scrolling fps is
>> now
>> comprise between 40 and 46 fps.
>> I'm using The spark LabelItemRenderer which is based on
>> StyleableTextField
>> for the label.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6057.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Maurice Amsellem <ma...@systar.com>.
Yes, I missed it, it's in the utils package. Sorry.

Maurice 

-----Message d'origine-----
De : After24 [mailto:vincent@after24.net] 
Envoyé : lundi 7 avril 2014 16:31
À : users@flex.apache.org
Objet : RE: Coding a better flex mobile app

Maurice,

The app displays a framerate monitor based on mr Doob/Hi-Res-Stats.
 


Maurice Amsellem wrote
> Hi After24,  I noticed (without trying, just reading the source) that 
> your app displays the *desired* fps (stage.frameRate) but not the 
> *actual* framerate.
> 
> It would be nice to provide it as well, so that you can "quantify" the 
> smoothness.
> 
> There are many implementation on the web.  Here is one:
> http://vstyran-flex.ho.ua/FPSDisplayExample
> 
> Maurice
> 
> -----Message d'origine-----
> De : After24 [mailto:

> vincent@

> ]
> Envoyé : lundi 7 avril 2014 15:03
> À : 

> users@.apache

> Objet : RE: Coding a better flex mobile app
> 
> Hello,
> 
> So, following Javier advise regarding application framerate, I built a 
> benchmark to show how framerate acts on list scrolling smoothness.
> 
> May be I missed something (.apk and source code can be found here : 
> https://issues.apache.org/jira/browse/FLEX-34213
> &lt;https://issues.apache.org/jira/browse/FLEX-34213&gt;  ) but the 
> framerate don't seems to have a significant effect on the scrolling 
> smoothness perception (tested on a nexus 4 and a nexus 7 II).
> 
> Thanks.
> 
> 
> 
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mo
> bile-app-tp5888p6048.html Sent from the Apache Flex Users mailing list 
> archive at Nabble.com.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6056.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Maurice,

The app displays a framerate monitor based on mr Doob/Hi-Res-Stats.
 


Maurice Amsellem wrote
> Hi After24,  I noticed (without trying, just reading the source) that your
> app displays the *desired* fps (stage.frameRate) but not the *actual*
> framerate.
> 
> It would be nice to provide it as well, so that you can "quantify" the
> smoothness.
> 
> There are many implementation on the web.  Here is one:
> http://vstyran-flex.ho.ua/FPSDisplayExample
> 
> Maurice 
> 
> -----Message d'origine-----
> De : After24 [mailto:

> vincent@

> ] 
> Envoyé : lundi 7 avril 2014 15:03
> À : 

> users@.apache

> Objet : RE: Coding a better flex mobile app
> 
> Hello,
> 
> So, following Javier advise regarding application framerate, I built a
> benchmark to show how framerate acts on list scrolling smoothness.
> 
> May be I missed something (.apk and source code can be found here : 
> https://issues.apache.org/jira/browse/FLEX-34213
> &lt;https://issues.apache.org/jira/browse/FLEX-34213&gt;  ) but the
> framerate don't seems to have a significant effect on the scrolling
> smoothness perception (tested on a nexus 4 and a nexus 7 II).
> 
> Thanks.
> 
> 
> 
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6056.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Maurice Amsellem <ma...@systar.com>.
Hi After24,  I noticed (without trying, just reading the source) that your app displays the *desired* fps (stage.frameRate) but not the *actual* framerate.

It would be nice to provide it as well, so that you can "quantify" the smoothness.

There are many implementation on the web.  Here is one:
http://vstyran-flex.ho.ua/FPSDisplayExample

Maurice 

-----Message d'origine-----
De : After24 [mailto:vincent@after24.net] 
Envoyé : lundi 7 avril 2014 15:03
À : users@flex.apache.org
Objet : RE: Coding a better flex mobile app

Hello,

So, following Javier advise regarding application framerate, I built a benchmark to show how framerate acts on list scrolling smoothness.

May be I missed something (.apk and source code can be found here : 
https://issues.apache.org/jira/browse/FLEX-34213
<https://issues.apache.org/jira/browse/FLEX-34213>  ) but the framerate don't seems to have a significant effect on the scrolling smoothness perception (tested on a nexus 4 and a nexus 7 II).

Thanks.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
:) wait until you enable caching and disable backgrounds ;)

El lunes, 7 de abril de 2014, After24 <vi...@after24.net> escribió:

> Javier,
>
> Setting renderMode to direct has a significant impact, scrolling fps is now
> comprise between 40 and 46 fps.
> I'm using The spark LabelItemRenderer which is based on StyleableTextField
> for the label.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Javier,

Setting renderMode to direct has a significant impact, scrolling fps is now
comprise between 40 and 46 fps.
I'm using The spark LabelItemRenderer which is based on StyleableTextField
for the label.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6054.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Use rendermode direct, set cacheasbitmap=true in your renderers, set the
opaquebackground to any color, disable autoDrawBackground, and use
StyleableTextField as itemrenderer (it's harder, but faster :)


On Mon, Apr 7, 2014 at 3:37 PM, After24 <vi...@after24.net> wrote:

> Hi Javier,
>
> RenderMode is set to auto and the ItemRenderer used is the bundle
> LabelItemRenterer.
> The higher framerate I can get on a nexus 4 is 30-33 fps, this gain has
> little impact on the scrolling smoothness perception.
>
>
>
>
> Javier Guerrero García wrote
> > renderMode? cacheAsBitmap=true? use StyleableTextField?
> > opaqueBackground=FFFFFF? autoDrawBackground=false?
> >
> > I said it was NOT the only thing: if your itemRenders are unable to go
> > further than 24fps, you won't notice any changes. BUT if they are, and
> you
> > don't set a higher framerate, you'll be stuck in 24fps :)
> >
> >
> > On Mon, Apr 7, 2014 at 3:03 PM, After24 &lt;
>
> > vincent@
>
> > &gt; wrote:
> >
> >> Hello,
> >>
> >> So, following Javier advise regarding application framerate, I built a
> >> benchmark to show how framerate acts on list scrolling smoothness.
> >>
> >> May be I missed something (.apk and source code can be found here :
> >> https://issues.apache.org/jira/browse/FLEX-34213
> >> &lt;https://issues.apache.org/jira/browse/FLEX-34213&gt;  ) but the
> >> framerate
> >> don't seems to have a significant effect on the scrolling smoothness
> >> perception (tested on a nexus 4 and a nexus 7 II).
> >>
> >> Thanks.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6051.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hi Javier,

RenderMode is set to auto and the ItemRenderer used is the bundle
LabelItemRenterer.
The higher framerate I can get on a nexus 4 is 30-33 fps, this gain has
little impact on the scrolling smoothness perception. 




Javier Guerrero García wrote
> renderMode? cacheAsBitmap=true? use StyleableTextField?
> opaqueBackground=FFFFFF? autoDrawBackground=false?
> 
> I said it was NOT the only thing: if your itemRenders are unable to go
> further than 24fps, you won't notice any changes. BUT if they are, and you
> don't set a higher framerate, you'll be stuck in 24fps :)
> 
> 
> On Mon, Apr 7, 2014 at 3:03 PM, After24 &lt;

> vincent@

> &gt; wrote:
> 
>> Hello,
>>
>> So, following Javier advise regarding application framerate, I built a
>> benchmark to show how framerate acts on list scrolling smoothness.
>>
>> May be I missed something (.apk and source code can be found here :
>> https://issues.apache.org/jira/browse/FLEX-34213
>> &lt;https://issues.apache.org/jira/browse/FLEX-34213&gt;  ) but the
>> framerate
>> don't seems to have a significant effect on the scrolling smoothness
>> perception (tested on a nexus 4 and a nexus 7 II).
>>
>> Thanks.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6051.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
renderMode? cacheAsBitmap=true? use StyleableTextField?
opaqueBackground=FFFFFF? autoDrawBackground=false?

I said it was NOT the only thing: if your itemRenders are unable to go
further than 24fps, you won't notice any changes. BUT if they are, and you
don't set a higher framerate, you'll be stuck in 24fps :)


On Mon, Apr 7, 2014 at 3:03 PM, After24 <vi...@after24.net> wrote:

> Hello,
>
> So, following Javier advise regarding application framerate, I built a
> benchmark to show how framerate acts on list scrolling smoothness.
>
> May be I missed something (.apk and source code can be found here :
> https://issues.apache.org/jira/browse/FLEX-34213
> <https://issues.apache.org/jira/browse/FLEX-34213>  ) but the framerate
> don't seems to have a significant effect on the scrolling smoothness
> perception (tested on a nexus 4 and a nexus 7 II).
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hello,

So, following Javier advise regarding application framerate, I built a
benchmark to show how framerate acts on list scrolling smoothness.

May be I missed something (.apk and source code can be found here : 
https://issues.apache.org/jira/browse/FLEX-34213
<https://issues.apache.org/jira/browse/FLEX-34213>  ) but the framerate
don't seems to have a significant effect on the scrolling smoothness
perception (tested on a nexus 4 and a nexus 7 II).

Thanks.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p6048.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Alex Harui <ah...@adobe.com>.
Well, yes, I would guess it uses more CPU just because some OS event is firing more often and runs some code in the player. but if there isn't work happening in the ENTER_FRAME and related events the difference could be hard to detect.  But folks have reported in the past that a high frame rate makes their app appear to have a non-zero CPU utilization in the Windows Program Manager.  Although that was probably years ago and CPUs are much faster now.

-Alex
________________________________________
From: jude [flexcapacitor@gmail.com]
Sent: Wednesday, April 2, 2014 8:52 PM
To: users@flex.apache.org
Subject: Re: Coding a better flex mobile app

Does it use more CPU if you're not running any code? I mean a higher frame
rate updates the display in the case of 30 fps to 60 fps 30 more times than
normal but if the view doesn't change and no code needs to execute how much
is really being used? Because, Flex has a invalidation for specific regions
that triggers a redraw for certain areas only when they change and the
Flash Player uses the display list to indicate to the GPU or software
renderer to indicate what areas need to be redrawn.

It would be a good test to see how much battery is drained in a blank or
simple app running at 30 FPS where there are no visual updates and then
again at 60FPS. Then another test where there is a visual change, say a
ball animating around the screen and measure the battery drain again in
both 30/ 60 FPS.


On Wed, Apr 2, 2014 at 1:09 PM, Alex Harui <ah...@adobe.com> wrote:

> Using a higher frame rate can increase your cpu utilization and
> potentially burn battery faster. You can change it at runtime for when you
> really need it
> Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.
>
> Javier Guerrero García <ja...@gmail.com> wrote:
>
>
> Exactly the way I felt the first time :)
>
> I mean, it's not THE silver bullet, and your
> opaqueBackground/cacheAsBitmap/etc... optimizations of course counts
> (hugely on low end devices), BUT ... you really can notice the difference
> :)
>
> Cheers :)
>
>
> On Wed, Apr 2, 2014 at 7:03 PM, After24 <vi...@after24.net> wrote:
>
> > Hi Javier,
> >
> > To be honest I never tried to change the framerate of the application...
> > I'm
> > feeling a bit stupid now :-)
> > Will try with an app on a Nexus S and a nexus 4.
> >
> > Thanks.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
>

Re: Coding a better flex mobile app

Posted by jude <fl...@gmail.com>.
Does it use more CPU if you're not running any code? I mean a higher frame
rate updates the display in the case of 30 fps to 60 fps 30 more times than
normal but if the view doesn't change and no code needs to execute how much
is really being used? Because, Flex has a invalidation for specific regions
that triggers a redraw for certain areas only when they change and the
Flash Player uses the display list to indicate to the GPU or software
renderer to indicate what areas need to be redrawn.

It would be a good test to see how much battery is drained in a blank or
simple app running at 30 FPS where there are no visual updates and then
again at 60FPS. Then another test where there is a visual change, say a
ball animating around the screen and measure the battery drain again in
both 30/ 60 FPS.


On Wed, Apr 2, 2014 at 1:09 PM, Alex Harui <ah...@adobe.com> wrote:

> Using a higher frame rate can increase your cpu utilization and
> potentially burn battery faster. You can change it at runtime for when you
> really need it
> Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.
>
> Javier Guerrero García <ja...@gmail.com> wrote:
>
>
> Exactly the way I felt the first time :)
>
> I mean, it's not THE silver bullet, and your
> opaqueBackground/cacheAsBitmap/etc... optimizations of course counts
> (hugely on low end devices), BUT ... you really can notice the difference
> :)
>
> Cheers :)
>
>
> On Wed, Apr 2, 2014 at 7:03 PM, After24 <vi...@after24.net> wrote:
>
> > Hi Javier,
> >
> > To be honest I never tried to change the framerate of the application...
> > I'm
> > feeling a bit stupid now :-)
> > Will try with an app on a Nexus S and a nexus 4.
> >
> > Thanks.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
>

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Of course, Alex, what did you expected? Everything faster and smoother AND
lower battery consumption? What else, free data downloading with unlimited
bandwith too? :)

Try with the /allowMiracles command line switch when compiling :)


On Wed, Apr 2, 2014 at 8:09 PM, Alex Harui <ah...@adobe.com> wrote:

> Using a higher frame rate can increase your cpu utilization and
> potentially burn battery faster. You can change it at runtime for when you
> really need it
> Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.
>
> Javier Guerrero García <ja...@gmail.com> wrote:
>
>
> Exactly the way I felt the first time :)
>
> I mean, it's not THE silver bullet, and your
> opaqueBackground/cacheAsBitmap/etc... optimizations of course counts
> (hugely on low end devices), BUT ... you really can notice the difference
> :)
>
> Cheers :)
>
>
> On Wed, Apr 2, 2014 at 7:03 PM, After24 <vi...@after24.net> wrote:
>
> > Hi Javier,
> >
> > To be honest I never tried to change the framerate of the application...
> > I'm
> > feeling a bit stupid now :-)
> > Will try with an app on a Nexus S and a nexus 4.
> >
> > Thanks.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
>

Re: Coding a better flex mobile app

Posted by Alex Harui <ah...@adobe.com>.
Using a higher frame rate can increase your cpu utilization and potentially burn battery faster. You can change it at runtime for when you really need it
Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.

Javier Guerrero García <ja...@gmail.com> wrote:


Exactly the way I felt the first time :)

I mean, it's not THE silver bullet, and your
opaqueBackground/cacheAsBitmap/etc... optimizations of course counts
(hugely on low end devices), BUT ... you really can notice the difference :)

Cheers :)


On Wed, Apr 2, 2014 at 7:03 PM, After24 <vi...@after24.net> wrote:

> Hi Javier,
>
> To be honest I never tried to change the framerate of the application...
> I'm
> feeling a bit stupid now :-)
> Will try with an app on a Nexus S and a nexus 4.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Exactly the way I felt the first time :)

I mean, it's not THE silver bullet, and your
opaqueBackground/cacheAsBitmap/etc... optimizations of course counts
(hugely on low end devices), BUT ... you really can notice the difference :)

Cheers :)


On Wed, Apr 2, 2014 at 7:03 PM, After24 <vi...@after24.net> wrote:

> Hi Javier,
>
> To be honest I never tried to change the framerate of the application...
> I'm
> feeling a bit stupid now :-)
> Will try with an app on a Nexus S and a nexus 4.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hi Javier,

To be honest I never tried to change the framerate of the application... I'm
feeling a bit stupid now :-)
Will try with an app on a Nexus S and a nexus 4.

Thanks.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5925.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Here's a couple of link with examples and info:

http://www.morearty.com/blog/2006/07/17/flex-tip-a-higher-frame-rate-even-makes-text-entry-look-better/

http://help.adobe.com/en_US/as3/mobile/WS948100b6829bd5a61c0b0b612763986266-8000.html


On Wed, Apr 2, 2014 at 6:18 PM, Javier Guerrero García <ja...@gmail.com>wrote:

> Have anyone on this thread EVER had a look at the s:Application object
> attribute *frameRate*?
>
>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Application.html
>
> It *defaults to 24fps*, but everything runs really great at 60 :) (and
> believe me, your high end mobiles are PRETTY much capable of that with just
> some opaqueBackground and cacheAsBitmap optimizations of your MXML
> itemRenderers, not even AS3 :).
>
> For iOS (which in my personal experience is much better handling flex view
> pipeline than Android, although less powerfull computing-wise), setting it
> to 60 makes everything silk smooth, almost near any native app.
>
> Just add that attrib to your main.mxml and recompile :)
>
>
> On Wed, Apr 2, 2014 at 5:53 PM, After24 <vi...@after24.net> wrote:
>
>> I agree with David,
>>
>> Saying "Flex on mobile is slow" is inacurate and mainly caused by the
>> average performance of scrolling lists. I have tried to look into ListBase
>> to see if I could make optimizations but the I must recognize that the
>> amount of code is very intimidating...
>>
>>
>> flex wrote
>> > This is why I mentioned trying to leverage some basic starling/feathers
>> > capabilities for some of the most used components like scrolling lists.
>> > I'm not sure if that would be possible but that slight lag plays into
>> that
>> > whole narrative about slowness, memory hogging, battery life etc that
>> has
>> > plagued the runtime on mobile.
>> >
>> > My experience is that pretty much none of that is true or accurate but
>> if
>> > there's a specific rendering lag on lists that aren't hardware
>> accelerated
>> > it gives people and excuse to class the whole thing is somehow slow or
>> bad
>> > or whatever else. Meanwhile the framework itself is great because it
>> makes
>> > things easier and faster for development and control over the runtime.
>> >
>> > David
>> >
>> >
>> >
>> > -----Original Message-----
>> > From: OmPrakash Muppirala &lt;
>>
>> > bigosmallm@
>>
>> > &gt;
>> > To:
>>
>> > users@.apache
>>
>> > Sent: Wed, 02 Apr 2014 9:51 AM
>> > Subject: RE: Coding a better flex mobile app
>> >
>> > "Just to test performances I created an Hello World app in Objective-C,
>> > AS3
>> > and Flex, just a pair of views with a few buttons, and the Flex one was
>> > dramatically slow and heavy compared with the others."
>> >
>> > This doesn't sound right to me.  Forget 60fps graphics, it seems
>> Gabriele
>> > is not able to get a very simple UI working properly.
>> >
>> > Do you want to post some code so that we can test and figure out what is
>> > going on?
>> >
>> > Thanks,
>> > Om
>> > On Apr 2, 2014 6:38 AM, "After24" &lt;
>>
>> > vincent@
>>
>> > &gt; wrote:
>> >
>> >> Hi Mark,
>> >>
>> >> Yes but like you said it's a Nexus 5... and it will probably take time
>> >> before this level of power reaches low-end devices.
>> >>
>> >>
>> >>
>> >>
>> >> Mark Line wrote
>> >> > Not sure how it was coded, but on
>> >> > http://flex.apache.org/community-showcase.html
>> >> >
>> >> > CityU Mobile runs really really nice on my nexus 5 (I know it's a
>> >> higher
>> >> > end), you should check it out
>> >> >
>> >> > -----Original Message-----
>> >> > From: After24 [mailto:
>> >>
>> >> > vincent@
>> >>
>> >> > ]
>> >> > Sent: 02 April 2014 11:13
>> >> > To:
>> >>
>> >> > users@.apache
>> >>
>> >> > Subject: Re: Coding a better flex mobile app
>> >> >
>> >> > Hello,
>> >> >
>> >> > From my personal experience, it's not possible to get a super fluid
>> app
>> >> > using flex mobile (especially on mid range phones and tablets). I
>> think
>> >> > this perception is mainly due to the list component which never
>> reaches
>> >> > 50/60 fps even when its itemRender is well optimized.
>> >> >
>> >> > I know that this need of smoothness is very subjective, but for me
>> it's
>> >> > essential and greatly improves the user experience and the pleasure
>> to
>> >> use
>> >> > an app.
>> >> > I understand that the flex framework wasn't originally designed to
>> run
>> >> on
>> >> > mobile devices and that optimizations are limited because of the
>> >> > architecture of the framework (14 000 lines of codes for UIComponent
>> >> for
>> >> > example). I'm absolutely not complaining about it and the situation
>> is
>> >> > going better and better with new generations of mobile devices.
>> >> >
>> >> > But for now I'm forced to choose other solutions to get a fluid
>> mobile
>> >> > app, to be specific I use :
>> >> >
>> >> > - Starling
>> >> > - Feather UI
>> >> > - Robotleg
>> >> > - AS3 signal
>> >> >
>> >> > I'm very happy with the result but frankly, the choice between this
>> >> stack
>> >> > and flex will be a no brainer if flex was able to perform as well on
>> >> > mobile.
>> >> > This is the trap with flex, it's so good and easy to develop with it
>> >> that
>> >> > others solutions, even if they works well, are very far from
>> >> approaching
>> >> > the ease of working with flex :-)
>> >> >
>> >> > One more time, it's not a criticism, I'm absolutely not complaining,
>> >> it's
>> >> > just my personal opinion about flex on mobile.
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> >
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
>> >> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
>> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5918.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>
>

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Yep, although it's true that retina iPads trend to run a little bit slow in
some versions of the SDK. Have a look at look4color app in the store
(ios/android), and check the performance of the list itemrenderers by
yourself :) (I promise they're all simple MXML renderers even with
bindings, no ultra-high-end AS3 sourcery here :)


On Wed, Apr 2, 2014 at 6:32 PM, Gabriele Campi [Media Logic] <
gabriele.campi@medialogic.eu> wrote:

> Have anyone on this thread EVER had a look at the s:Application object
>> attribute*frameRate*?
>>
> I did, and my apps are running at 60 but I didn't noticed great
> improvements.
>
> I think that performance and fps are only part of the problem.
> On low end devices (but also iPad2 or iPad mini) the available memory is
> limitated, and excessive ram consumption is a real issue.
> Did you test your application performance on a real device? I use
> Instruments (an Xcode tool), and  a blank Flex app with retina support
> requires at least 60MB RAM (with peaks of 80MB while changing view).
>

Re: Coding a better flex mobile app

Posted by "Gabriele Campi [Media Logic]" <ga...@medialogic.eu>.
> Have anyone on this thread EVER had a look at the s:Application object
> attribute*frameRate*?
I did, and my apps are running at 60 but I didn't noticed great 
improvements.

I think that performance and fps are only part of the problem.
On low end devices (but also iPad2 or iPad mini) the available memory is 
limitated, and excessive ram consumption is a real issue.
Did you test your application performance on a real device? I use 
Instruments (an Xcode tool), and  a blank Flex app with retina support 
requires at least 60MB RAM (with peaks of 80MB while changing view).

Re: Coding a better flex mobile app

Posted by Javier Guerrero García <ja...@gmail.com>.
Have anyone on this thread EVER had a look at the s:Application object
attribute *frameRate*?

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Application.html

It *defaults to 24fps*, but everything runs really great at 60 :) (and
believe me, your high end mobiles are PRETTY much capable of that with just
some opaqueBackground and cacheAsBitmap optimizations of your MXML
itemRenderers, not even AS3 :).

For iOS (which in my personal experience is much better handling flex view
pipeline than Android, although less powerfull computing-wise), setting it
to 60 makes everything silk smooth, almost near any native app.

Just add that attrib to your main.mxml and recompile :)


On Wed, Apr 2, 2014 at 5:53 PM, After24 <vi...@after24.net> wrote:

> I agree with David,
>
> Saying "Flex on mobile is slow" is inacurate and mainly caused by the
> average performance of scrolling lists. I have tried to look into ListBase
> to see if I could make optimizations but the I must recognize that the
> amount of code is very intimidating...
>
>
> flex wrote
> > This is why I mentioned trying to leverage some basic starling/feathers
> > capabilities for some of the most used components like scrolling lists.
> > I'm not sure if that would be possible but that slight lag plays into
> that
> > whole narrative about slowness, memory hogging, battery life etc that has
> > plagued the runtime on mobile.
> >
> > My experience is that pretty much none of that is true or accurate but if
> > there's a specific rendering lag on lists that aren't hardware
> accelerated
> > it gives people and excuse to class the whole thing is somehow slow or
> bad
> > or whatever else. Meanwhile the framework itself is great because it
> makes
> > things easier and faster for development and control over the runtime.
> >
> > David
> >
> >
> >
> > -----Original Message-----
> > From: OmPrakash Muppirala &lt;
>
> > bigosmallm@
>
> > &gt;
> > To:
>
> > users@.apache
>
> > Sent: Wed, 02 Apr 2014 9:51 AM
> > Subject: RE: Coding a better flex mobile app
> >
> > "Just to test performances I created an Hello World app in Objective-C,
> > AS3
> > and Flex, just a pair of views with a few buttons, and the Flex one was
> > dramatically slow and heavy compared with the others."
> >
> > This doesn't sound right to me.  Forget 60fps graphics, it seems Gabriele
> > is not able to get a very simple UI working properly.
> >
> > Do you want to post some code so that we can test and figure out what is
> > going on?
> >
> > Thanks,
> > Om
> > On Apr 2, 2014 6:38 AM, "After24" &lt;
>
> > vincent@
>
> > &gt; wrote:
> >
> >> Hi Mark,
> >>
> >> Yes but like you said it's a Nexus 5... and it will probably take time
> >> before this level of power reaches low-end devices.
> >>
> >>
> >>
> >>
> >> Mark Line wrote
> >> > Not sure how it was coded, but on
> >> > http://flex.apache.org/community-showcase.html
> >> >
> >> > CityU Mobile runs really really nice on my nexus 5 (I know it's a
> >> higher
> >> > end), you should check it out
> >> >
> >> > -----Original Message-----
> >> > From: After24 [mailto:
> >>
> >> > vincent@
> >>
> >> > ]
> >> > Sent: 02 April 2014 11:13
> >> > To:
> >>
> >> > users@.apache
> >>
> >> > Subject: Re: Coding a better flex mobile app
> >> >
> >> > Hello,
> >> >
> >> > From my personal experience, it's not possible to get a super fluid
> app
> >> > using flex mobile (especially on mid range phones and tablets). I
> think
> >> > this perception is mainly due to the list component which never
> reaches
> >> > 50/60 fps even when its itemRender is well optimized.
> >> >
> >> > I know that this need of smoothness is very subjective, but for me
> it's
> >> > essential and greatly improves the user experience and the pleasure to
> >> use
> >> > an app.
> >> > I understand that the flex framework wasn't originally designed to run
> >> on
> >> > mobile devices and that optimizations are limited because of the
> >> > architecture of the framework (14 000 lines of codes for UIComponent
> >> for
> >> > example). I'm absolutely not complaining about it and the situation is
> >> > going better and better with new generations of mobile devices.
> >> >
> >> > But for now I'm forced to choose other solutions to get a fluid mobile
> >> > app, to be specific I use :
> >> >
> >> > - Starling
> >> > - Feather UI
> >> > - Robotleg
> >> > - AS3 signal
> >> >
> >> > I'm very happy with the result but frankly, the choice between this
> >> stack
> >> > and flex will be a no brainer if flex was able to perform as well on
> >> > mobile.
> >> > This is the trap with flex, it's so good and easy to develop with it
> >> that
> >> > others solutions, even if they works well, are very far from
> >> approaching
> >> > the ease of working with flex :-)
> >> >
> >> > One more time, it's not a criticism, I'm absolutely not complaining,
> >> it's
> >> > just my personal opinion about flex on mobile.
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> >> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5918.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
I agree with David,

Saying "Flex on mobile is slow" is inacurate and mainly caused by the
average performance of scrolling lists. I have tried to look into ListBase
to see if I could make optimizations but the I must recognize that the
amount of code is very intimidating...


flex wrote
> This is why I mentioned trying to leverage some basic starling/feathers
> capabilities for some of the most used components like scrolling lists.
> I'm not sure if that would be possible but that slight lag plays into that
> whole narrative about slowness, memory hogging, battery life etc that has
> plagued the runtime on mobile.
> 
> My experience is that pretty much none of that is true or accurate but if
> there's a specific rendering lag on lists that aren't hardware accelerated
> it gives people and excuse to class the whole thing is somehow slow or bad
> or whatever else. Meanwhile the framework itself is great because it makes
> things easier and faster for development and control over the runtime.
> 
> David
> 
> 
> 
> -----Original Message-----
> From: OmPrakash Muppirala &lt;

> bigosmallm@

> &gt;
> To: 

> users@.apache

> Sent: Wed, 02 Apr 2014 9:51 AM
> Subject: RE: Coding a better flex mobile app
> 
> "Just to test performances I created an Hello World app in Objective-C,
> AS3
> and Flex, just a pair of views with a few buttons, and the Flex one was
> dramatically slow and heavy compared with the others."
> 
> This doesn't sound right to me.  Forget 60fps graphics, it seems Gabriele
> is not able to get a very simple UI working properly.
> 
> Do you want to post some code so that we can test and figure out what is
> going on?
> 
> Thanks,
> Om
> On Apr 2, 2014 6:38 AM, "After24" &lt;

> vincent@

> &gt; wrote:
> 
>> Hi Mark,
>>
>> Yes but like you said it's a Nexus 5... and it will probably take time
>> before this level of power reaches low-end devices.
>>
>>
>>
>>
>> Mark Line wrote
>> > Not sure how it was coded, but on
>> > http://flex.apache.org/community-showcase.html
>> >
>> > CityU Mobile runs really really nice on my nexus 5 (I know it's a
>> higher
>> > end), you should check it out
>> >
>> > -----Original Message-----
>> > From: After24 [mailto:
>>
>> > vincent@
>>
>> > ]
>> > Sent: 02 April 2014 11:13
>> > To:
>>
>> > users@.apache
>>
>> > Subject: Re: Coding a better flex mobile app
>> >
>> > Hello,
>> >
>> > From my personal experience, it's not possible to get a super fluid app
>> > using flex mobile (especially on mid range phones and tablets). I think
>> > this perception is mainly due to the list component which never reaches
>> > 50/60 fps even when its itemRender is well optimized.
>> >
>> > I know that this need of smoothness is very subjective, but for me it's
>> > essential and greatly improves the user experience and the pleasure to
>> use
>> > an app.
>> > I understand that the flex framework wasn't originally designed to run
>> on
>> > mobile devices and that optimizations are limited because of the
>> > architecture of the framework (14 000 lines of codes for UIComponent
>> for
>> > example). I'm absolutely not complaining about it and the situation is
>> > going better and better with new generations of mobile devices.
>> >
>> > But for now I'm forced to choose other solutions to get a fluid mobile
>> > app, to be specific I use :
>> >
>> > - Starling
>> > - Feather UI
>> > - Robotleg
>> > - AS3 signal
>> >
>> > I'm very happy with the result but frankly, the choice between this
>> stack
>> > and flex will be a no brainer if flex was able to perform as well on
>> > mobile.
>> > This is the trap with flex, it's so good and easy to develop with it
>> that
>> > others solutions, even if they works well, are very far from
>> approaching
>> > the ease of working with flex :-)
>> >
>> > One more time, it's not a criticism, I'm absolutely not complaining,
>> it's
>> > just my personal opinion about flex on mobile.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
>> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5918.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by fl...@dfguy.us.
This is why I mentioned trying to leverage some basic starling/feathers capabilities for some of the most used components like scrolling lists. I'm not sure if that would be possible but that slight lag plays into that whole narrative about slowness, memory hogging, battery life etc that has plagued the runtime on mobile.

My experience is that pretty much none of that is true or accurate but if there's a specific rendering lag on lists that aren't hardware accelerated it gives people and excuse to class the whole thing is somehow slow or bad or whatever else. Meanwhile the framework itself is great because it makes things easier and faster for development and control over the runtime.

David



-----Original Message-----
From: OmPrakash Muppirala <bi...@gmail.com>
To: users@flex.apache.org
Sent: Wed, 02 Apr 2014 9:51 AM
Subject: RE: Coding a better flex mobile app

"Just to test performances I created an Hello World app in Objective-C, AS3
and Flex, just a pair of views with a few buttons, and the Flex one was
dramatically slow and heavy compared with the others."

This doesn't sound right to me.  Forget 60fps graphics, it seems Gabriele
is not able to get a very simple UI working properly.

Do you want to post some code so that we can test and figure out what is
going on?

Thanks,
Om
On Apr 2, 2014 6:38 AM, "After24" <vi...@after24.net> wrote:

> Hi Mark,
>
> Yes but like you said it's a Nexus 5... and it will probably take time
> before this level of power reaches low-end devices.
>
>
>
>
> Mark Line wrote
> > Not sure how it was coded, but on
> > http://flex.apache.org/community-showcase.html
> >
> > CityU Mobile runs really really nice on my nexus 5 (I know it's a higher
> > end), you should check it out
> >
> > -----Original Message-----
> > From: After24 [mailto:
>
> > vincent@
>
> > ]
> > Sent: 02 April 2014 11:13
> > To:
>
> > users@.apache
>
> > Subject: Re: Coding a better flex mobile app
> >
> > Hello,
> >
> > From my personal experience, it's not possible to get a super fluid app
> > using flex mobile (especially on mid range phones and tablets). I think
> > this perception is mainly due to the list component which never reaches
> > 50/60 fps even when its itemRender is well optimized.
> >
> > I know that this need of smoothness is very subjective, but for me it's
> > essential and greatly improves the user experience and the pleasure to
> use
> > an app.
> > I understand that the flex framework wasn't originally designed to run on
> > mobile devices and that optimizations are limited because of the
> > architecture of the framework (14 000 lines of codes for UIComponent for
> > example). I'm absolutely not complaining about it and the situation is
> > going better and better with new generations of mobile devices.
> >
> > But for now I'm forced to choose other solutions to get a fluid mobile
> > app, to be specific I use :
> >
> > - Starling
> > - Feather UI
> > - Robotleg
> > - AS3 signal
> >
> > I'm very happy with the result but frankly, the choice between this stack
> > and flex will be a no brainer if flex was able to perform as well on
> > mobile.
> > This is the trap with flex, it's so good and easy to develop with it that
> > others solutions, even if they works well, are very far from approaching
> > the ease of working with flex :-)
> >
> > One more time, it's not a criticism, I'm absolutely not complaining, it's
> > just my personal opinion about flex on mobile.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Coding a better flex mobile app

Posted by simon gladman <sg...@gmail.com>.
I have two apps out on both iOS and Android tablets and both are Flex
based. One is a game using Nape Physics and the other a maths app with lots
of visual updates on the screen with each frame.

Both run fine on my iPad 3 and little Nexus 7 - around 30fps which, for my
requirements (and especially for the non-game app) is absolutely fine.

Could I strip out Flex and gain some extra performance? Of course I could,
but my development time would increase significantly. Flex gives me all the
life cycle validation stuff, great skinning and layout, collections, yada
yada yada. I've written applications in Feathers and, as lovely as it is, I
did miss Flex :)

SImon


On 2 April 2014 15:51, OmPrakash Muppirala <bi...@gmail.com> wrote:

> "Just to test performances I created an Hello World app in Objective-C, AS3
> and Flex, just a pair of views with a few buttons, and the Flex one was
> dramatically slow and heavy compared with the others."
>
> This doesn't sound right to me.  Forget 60fps graphics, it seems Gabriele
> is not able to get a very simple UI working properly.
>
> Do you want to post some code so that we can test and figure out what is
> going on?
>
> Thanks,
> Om
> On Apr 2, 2014 6:38 AM, "After24" <vi...@after24.net> wrote:
>
> > Hi Mark,
> >
> > Yes but like you said it's a Nexus 5... and it will probably take time
> > before this level of power reaches low-end devices.
> >
> >
> >
> >
> > Mark Line wrote
> > > Not sure how it was coded, but on
> > > http://flex.apache.org/community-showcase.html
> > >
> > > CityU Mobile runs really really nice on my nexus 5 (I know it's a
> higher
> > > end), you should check it out
> > >
> > > -----Original Message-----
> > > From: After24 [mailto:
> >
> > > vincent@
> >
> > > ]
> > > Sent: 02 April 2014 11:13
> > > To:
> >
> > > users@.apache
> >
> > > Subject: Re: Coding a better flex mobile app
> > >
> > > Hello,
> > >
> > > From my personal experience, it's not possible to get a super fluid app
> > > using flex mobile (especially on mid range phones and tablets). I think
> > > this perception is mainly due to the list component which never reaches
> > > 50/60 fps even when its itemRender is well optimized.
> > >
> > > I know that this need of smoothness is very subjective, but for me it's
> > > essential and greatly improves the user experience and the pleasure to
> > use
> > > an app.
> > > I understand that the flex framework wasn't originally designed to run
> on
> > > mobile devices and that optimizations are limited because of the
> > > architecture of the framework (14 000 lines of codes for UIComponent
> for
> > > example). I'm absolutely not complaining about it and the situation is
> > > going better and better with new generations of mobile devices.
> > >
> > > But for now I'm forced to choose other solutions to get a fluid mobile
> > > app, to be specific I use :
> > >
> > > - Starling
> > > - Feather UI
> > > - Robotleg
> > > - AS3 signal
> > >
> > > I'm very happy with the result but frankly, the choice between this
> stack
> > > and flex will be a no brainer if flex was able to perform as well on
> > > mobile.
> > > This is the trap with flex, it's so good and easy to develop with it
> that
> > > others solutions, even if they works well, are very far from
> approaching
> > > the ease of working with flex :-)
> > >
> > > One more time, it's not a criticism, I'm absolutely not complaining,
> it's
> > > just my personal opinion about flex on mobile.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> > > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
>



-- 
*flexmonkey.co.uk <http://flexmonkey.co.uk> | @FlexMonkey
<https://twitter.com/FlexMonkey> | +44 (0) 7973 669691*

RE: Coding a better flex mobile app

Posted by OmPrakash Muppirala <bi...@gmail.com>.
"Just to test performances I created an Hello World app in Objective-C, AS3
and Flex, just a pair of views with a few buttons, and the Flex one was
dramatically slow and heavy compared with the others."

This doesn't sound right to me.  Forget 60fps graphics, it seems Gabriele
is not able to get a very simple UI working properly.

Do you want to post some code so that we can test and figure out what is
going on?

Thanks,
Om
On Apr 2, 2014 6:38 AM, "After24" <vi...@after24.net> wrote:

> Hi Mark,
>
> Yes but like you said it's a Nexus 5... and it will probably take time
> before this level of power reaches low-end devices.
>
>
>
>
> Mark Line wrote
> > Not sure how it was coded, but on
> > http://flex.apache.org/community-showcase.html
> >
> > CityU Mobile runs really really nice on my nexus 5 (I know it's a higher
> > end), you should check it out
> >
> > -----Original Message-----
> > From: After24 [mailto:
>
> > vincent@
>
> > ]
> > Sent: 02 April 2014 11:13
> > To:
>
> > users@.apache
>
> > Subject: Re: Coding a better flex mobile app
> >
> > Hello,
> >
> > From my personal experience, it's not possible to get a super fluid app
> > using flex mobile (especially on mid range phones and tablets). I think
> > this perception is mainly due to the list component which never reaches
> > 50/60 fps even when its itemRender is well optimized.
> >
> > I know that this need of smoothness is very subjective, but for me it's
> > essential and greatly improves the user experience and the pleasure to
> use
> > an app.
> > I understand that the flex framework wasn't originally designed to run on
> > mobile devices and that optimizations are limited because of the
> > architecture of the framework (14 000 lines of codes for UIComponent for
> > example). I'm absolutely not complaining about it and the situation is
> > going better and better with new generations of mobile devices.
> >
> > But for now I'm forced to choose other solutions to get a fluid mobile
> > app, to be specific I use :
> >
> > - Starling
> > - Feather UI
> > - Robotleg
> > - AS3 signal
> >
> > I'm very happy with the result but frankly, the choice between this stack
> > and flex will be a no brainer if flex was able to perform as well on
> > mobile.
> > This is the trap with flex, it's so good and easy to develop with it that
> > others solutions, even if they works well, are very far from approaching
> > the ease of working with flex :-)
> >
> > One more time, it's not a criticism, I'm absolutely not complaining, it's
> > just my personal opinion about flex on mobile.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

RE: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hi Mark,

Yes but like you said it's a Nexus 5... and it will probably take time
before this level of power reaches low-end devices.




Mark Line wrote
> Not sure how it was coded, but on
> http://flex.apache.org/community-showcase.html
> 
> CityU Mobile runs really really nice on my nexus 5 (I know it’s a higher
> end), you should check it out
> 
> -----Original Message-----
> From: After24 [mailto:

> vincent@

> ] 
> Sent: 02 April 2014 11:13
> To: 

> users@.apache

> Subject: Re: Coding a better flex mobile app
> 
> Hello,
> 
> From my personal experience, it's not possible to get a super fluid app
> using flex mobile (especially on mid range phones and tablets). I think
> this perception is mainly due to the list component which never reaches
> 50/60 fps even when its itemRender is well optimized.
> 
> I know that this need of smoothness is very subjective, but for me it’s
> essential and greatly improves the user experience and the pleasure to use
> an app.
> I understand that the flex framework wasn’t originally designed to run on
> mobile devices and that optimizations are limited because of the
> architecture of the framework (14 000 lines of codes for UIComponent for
> example). I’m absolutely not complaining about it and the situation is
> going better and better with new generations of mobile devices.
> 
> But for now I’m forced to choose other solutions to get a fluid mobile
> app, to be specific I use :
> 
> - Starling
> - Feather UI
> - Robotleg
> - AS3 signal
> 
> I’m very happy with the result but frankly, the choice between this stack
> and flex will be a no brainer if flex was able to perform as well on
> mobile.
> This is the trap with flex, it’s so good and easy to develop with it that
> others solutions, even if they works well, are very far from approaching
> the ease of working with flex :-)
> 
> One more time, it’s not a criticism, I’m absolutely not complaining, it’s
> just my personal opinion about flex on mobile.
> 
> 
> 
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5906.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Coding a better flex mobile app

Posted by Mark Line <ma...@gmail.com>.
Not sure how it was coded, but on http://flex.apache.org/community-showcase.html

CityU Mobile runs really really nice on my nexus 5 (I know it’s a higher end), you should check it out

-----Original Message-----
From: After24 [mailto:vincent@after24.net] 
Sent: 02 April 2014 11:13
To: users@flex.apache.org
Subject: Re: Coding a better flex mobile app

Hello,

>From my personal experience, it's not possible to get a super fluid app using flex mobile (especially on mid range phones and tablets). I think this perception is mainly due to the list component which never reaches 50/60 fps even when its itemRender is well optimized.

I know that this need of smoothness is very subjective, but for me it’s essential and greatly improves the user experience and the pleasure to use an app.
I understand that the flex framework wasn’t originally designed to run on mobile devices and that optimizations are limited because of the architecture of the framework (14 000 lines of codes for UIComponent for example). I’m absolutely not complaining about it and the situation is going better and better with new generations of mobile devices.

But for now I’m forced to choose other solutions to get a fluid mobile app, to be specific I use :

- Starling
- Feather UI
- Robotleg
- AS3 signal

I’m very happy with the result but frankly, the choice between this stack and flex will be a no brainer if flex was able to perform as well on mobile.
This is the trap with flex, it’s so good and easy to develop with it that others solutions, even if they works well, are very far from approaching the ease of working with flex :-)

One more time, it’s not a criticism, I’m absolutely not complaining, it’s just my personal opinion about flex on mobile.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Coding a better flex mobile app

Posted by After24 <vi...@after24.net>.
Hello,

>From my personal experience, it's not possible to get a super fluid app
using flex mobile (especially on mid range phones and tablets). I think this
perception is mainly due to the list component which never reaches 50/60 fps
even when its itemRender is well optimized.

I know that this need of smoothness is very subjective, but for me it’s
essential and greatly improves the user experience and the pleasure to use
an app.
I understand that the flex framework wasn’t originally designed to run on
mobile devices and that optimizations are limited because of the
architecture of the framework (14 000 lines of codes for UIComponent for
example). I’m absolutely not complaining about it and the situation is going
better and better with new generations of mobile devices.

But for now I’m forced to choose other solutions to get a fluid mobile app,
to be specific I use :

- Starling
- Feather UI
- Robotleg
- AS3 signal

I’m very happy with the result but frankly, the choice between this stack
and flex will be a no brainer if flex was able to perform as well on mobile.
This is the trap with flex, it’s so good and easy to develop with it that
others solutions, even if they works well, are very far from approaching the
ease of working with flex :-)

One more time, it’s not a criticism, I’m absolutely not complaining, it’s
just my personal opinion about flex on mobile.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Coding-a-better-flex-mobile-app-tp5888p5895.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Coding a better flex mobile app

Posted by "Gabriele Campi [Media Logic]" <ga...@medialogic.eu>.
Hi Om, Tom and Justin,

I experienced performance problems with bitmapdata (I had to avoid pixel 
to pixel iterations cause they're too slow, also on small images of 
1024x768px) and in general with views transitions and UI components 
(they aren't as fluid and responsive as the native apps' ones - for 
example I wasn't able to create a simple, fluid, scrolling image gallery).
Another issue (a big issue on mobile) was the memory management: the app 
eats RAM and isn't easy to avoid memory leaks. It happens that 
EventListeners and particular components (like StageWebView) keep 
referenced in memory and the garbage collector seems unable to get rid 
of them. I also notice an increasing  RAM consumption on retina devices 
when 'requestedDisplayResolution' is set to 'high'.

For sure my code isn't optimized, I will start from there using Apache 
Flex 4.12


Il 02/04/14 10:20, OmPrakash Muppirala ha scritto:
> On Wed, Apr 2, 2014 at 1:05 AM, Gabriele Campi [Media Logic] <
> gabriele.campi@medialogic.eu> wrote:
>
>> Hi,
>>
>> last year I created a mobile app for IOS and Android using Apache Flex.
>>
>> My app uses a SQLite database and makes large use of graphics and
>> bitmapdata (being a design app that manipulates images) and I encountered
>> many problems with general performances and memory management. My app now
>> is heavy and slow.
>> It was my first project with Flex and Air technologies, and now it's time
>> to clear, improve, rewrite the code. What would be the better approach?
>>
>> Just to test performances I created an Hello World app in Objective-C, AS3
>> and Flex, just a pair of views with a few buttons, and the Flex one was
>> dramatically slow and heavy compared with the others.
>>
>> There are many opportunity out there (MVC frameworks like Robotlegs and
>> PureMVC, or pure AS3 solutions like MadComponents), could they be a viable
>> alternative?
>>
>> Thanks
>>
>> Gabriele
>>
> Gabriele,
>
> It is possible to create well performing mobile apps using Apache Flex.
> Here are a few examples: http://flex.apache.org/community-showcase.html
>
> Use the profiler and Adobe Scout to ensure that your code does not have
> significant performance bottlenecks.
>
> If you have more details on the performance problems you see, we might be
> able to help you out.
>
> Thanks,
> Om
>


Re: Coding a better flex mobile app

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Wed, Apr 2, 2014 at 1:05 AM, Gabriele Campi [Media Logic] <
gabriele.campi@medialogic.eu> wrote:

> Hi,
>
> last year I created a mobile app for IOS and Android using Apache Flex.
>
> My app uses a SQLite database and makes large use of graphics and
> bitmapdata (being a design app that manipulates images) and I encountered
> many problems with general performances and memory management. My app now
> is heavy and slow.
> It was my first project with Flex and Air technologies, and now it's time
> to clear, improve, rewrite the code. What would be the better approach?
>
> Just to test performances I created an Hello World app in Objective-C, AS3
> and Flex, just a pair of views with a few buttons, and the Flex one was
> dramatically slow and heavy compared with the others.
>
> There are many opportunity out there (MVC frameworks like Robotlegs and
> PureMVC, or pure AS3 solutions like MadComponents), could they be a viable
> alternative?
>
> Thanks
>
> Gabriele
>

Gabriele,

It is possible to create well performing mobile apps using Apache Flex.
Here are a few examples: http://flex.apache.org/community-showcase.html

Use the profiler and Adobe Scout to ensure that your code does not have
significant performance bottlenecks.

If you have more details on the performance problems you see, we might be
able to help you out.

Thanks,
Om

Re: Coding a better flex mobile app

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> My app uses a SQLite database and makes large use of graphics and bitmapdata (being a design app that manipulates images) and I encountered many problems with general performances and memory management. My app now is heavy and slow.

Scout should be able to show you many places where you can improve your code.

> There are many opportunity out there (MVC frameworks like Robotlegs and PureMVC,
Any framework usually comes with some performance costs/overheads but make make development more manageable and most mobile applications probably wouldn't benefit a heavyweight framework like PureMVC (IMO).

> or pure AS3 solutions like MadComponents
That can be an option and is likely to be faster and may not have all the components you needs.

There have also been many speed and performance improvements in recent versions of Apache Flex you might want to try out 4.12 and see if that improves things. 

Thanks,
Justin

Re: Coding a better flex mobile app

Posted by Angelo Lazzari <an...@redtulp.com>.
Hi Gabriele,
i would suggest you to continue using Apache Flex but adding the Starling
framework and the fathersUI interface.

This software stack will improve your app performance FOR SURE but you have
to consider to re-code at least the view layer (if you developed in MVC
architecture) or the entire app if you don't...

Anyway these are the software we use when performance are an important
requirement for our clients.

Here are the links:
*STARLING*: http://gamua.com/starling/
*FATHERSUI: *http://feathersui.com

Hope this help
Angelo



2014-04-02 10:05 GMT+02:00 Gabriele Campi [Media Logic] <
gabriele.campi@medialogic.eu>:

> Hi,
>
> last year I created a mobile app for IOS and Android using Apache Flex.
>
> My app uses a SQLite database and makes large use of graphics and
> bitmapdata (being a design app that manipulates images) and I encountered
> many problems with general performances and memory management. My app now
> is heavy and slow.
> It was my first project with Flex and Air technologies, and now it's time
> to clear, improve, rewrite the code. What would be the better approach?
>
> Just to test performances I created an Hello World app in Objective-C, AS3
> and Flex, just a pair of views with a few buttons, and the Flex one was
> dramatically slow and heavy compared with the others.
>
> There are many opportunity out there (MVC frameworks like Robotlegs and
> PureMVC, or pure AS3 solutions like MadComponents), could they be a viable
> alternative?
>
> Thanks
>
> Gabriele
>

Re: Coding a better flex mobile app

Posted by Tom Chiverton <tc...@extravision.com>.
On 02/04/14 09:05, Gabriele Campi [Media Logic] wrote:
> My app uses a SQLite database and makes large use of graphics and 
> bitmapdata (being a design app that manipulates images) and I 
> encountered many problems with general performances and memory 
> management. My app now is heavy and slow. 
This doesn't mean much without being qualified.
What's 'large use' ? How big is the bitmap you are manipulating ? What 
are you doing to it ?
On what spec of computer was it slow and why ? Was it thrashing the disk 
or the CPU, for instance ?

Tom