flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jude <flexcapaci...@gmail.com>
Subject non-blocking preloading animation?
Date Sat, 27 Jul 2013 18:44:48 GMT
if you're seeing freezing it means you're most likely stuck in a loop
somewhere in your code possibly parsing results from the server or that you
or a component is calling validate now and not using phased instantiation.
the flex framework prevents most of this sort of thing by default.

using scout will tell you where things are bogging down.

using states and creating things on demand is really what you'll want to do
as Alex mentioned.

what I do on multi target projects and may help here is have
the application contain only one visual element and that being a group
container sized to 100% or constrained to the edges. that group would then
contain the application.

there are a couple reasons for this. this lets you have different
application containers like application for browser and windowed
application for desktop version one for mobile and so on. it also lets you
have multiple applications in the same project each with its own CSS and
unique configuration options (paid vs free app for example).

this will also allow you to easily break your application up into a loaded
state and then a created state. in the first state you only have the bare
minimum. the second state has the application content. this lets you show
an intro screen, show application navigation options or a second preloader
screen. and then when you're ready move to the next state and create
and show the root group. this may prevent the freezing.

to do this add two states in your main application and move your
root group to be included in the second state with creation policy to auto
(or leave it blank auto is the default). this also makes it easier to debug
since you can comment out the main group and add in sub groups for
testing depending how've built it.

On Saturday, July 27, 2013, Ajar wrote:

> Hi Mark
> thank you for your answer
> Scout is a great idea, I'll loo into it.
> I'm glad you suggested workers as this is a good opportunity to find out if
> they can help in these sort of tasks...
> I'm under the impression that workers were created to offload heavy
> processing that can run asyncroneously like encoding of a file...
> The  typical tasks that run in a web app are
>
>    - getting data from remote services, some queries are obvious and some
>    unique.
>    - parsing data coming back and rendering it in complex custom
>    components ?
>    - manage interactivity and navigating the app.
>    - caching?
>
>  are any off those a good candidate for workers?
>
> would love to get your feedback
> cheers
> Ajar
>
>
>
> On Sat, Jul 27, 2013 at 10:26 AM, Mark Line <markline@gmail.com> wrote:
>
> > I found adobe scout really useful to find performance issues, pretty easy
> > to
> > see where the frame time is going over.
> >
> > You could try and put sections of code into workers?
> >
> > -----Original Message-----
> > From: yariv.gilad@gmail.com [mailto:yariv.gilad@gmail.com] On Behalf Of
> > Ajar
> > Sent: 27 July 2013 05:27
> > To: users@flex.apache.org
> > Subject: Re: non-blocking preloading animation?
> >
> > Thanks for that Alex.
> > :)
> >
> > On Fri, Jul 26, 2013 at 10:58 PM, Alex Harui <aharui@adobe.com> wrote:
> >
> > >
> > >
> > > On 7/26/13 12:31 PM, "Ajar" <ajar.interactive@gmail.com> wrote:
> > >
> > > >Hi all
> > > >I have a big flex web project
> > > >It takes a while to load.... its around 3M for the main app swf and
> > > >80K for additional 4 modules that loads afterwords The loading weight
> > > >is not bothering me, as we have this tiny animation with gags for the
> > > >user to go through, it's not terrible.
> > > >What bothers me is that once the app swf loads, everything chokes and
> > > >freeze, until the app initializes itself.
> > > >So I can't go the "perceived performance" way really because whatever
> > > >I put there freezes and chokes for good 30 seconds...
> > > >I even tried putting the preloader animation in a separate
> > > >light-weight flash swf and have it in a separate div on the html on
> > > >top at the center of the page.
> > > >it behaves just the same. it doesn't matter if its in a different
> > > >swf, it chokes just the same...
> > > >Does workers relevant for this kind of scenario?
> > > >Is there anything that comes to mind I could do beside re-writing the
> > > >application?
> > > Well, it depends on what you mean by 're-write'.  Use the profiler to
> > > see where all of the time is going.  Some of those application
> > > frameworks being discussed in the other thread can contribute to the
> > > problem by doing their injections on creationComplete.
> > >
> > > Another app I analyzed was using creationPolicy=all everywhere.  Sure,
> > > it makes your code easier to write, but then that's the price you pay.
> > > Think "on-demand" and "just-in-time", not "just-in-case".
> > >
> > > >:)
> > > >cheers
> > > >Ajar
> > >
> > >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message