5 Replies Latest reply on Sep 1, 2006 1:06 AM by CoolCountDracula

    how to design a flex app so that it loads fast


      i was gonna make a large CRM+ERP app in flex and was worried it would take a long time to load as even the smallest examples on various sites take quite a bit of time to load (quite a lot more than simple flash apps, why ??).

      i was thinking of breaking each component into individual swf but was afraid that it might make them pretty stand alone and not allow accesing their properties etc.

      what would be the simple and effective way to do this.

      can anyone point me to any large app developed in flex 2, i am also thinking of developing a Project Management app based on netoffice after this app. only if this gets developed succesfully coz macromedia used to have this great ability to make its flash look like the ultimate tool even when it had major short comings (one of them printing still exists in flex)

        • 1. Re: how to design a flex app so that it loads fast
          ntsiii Level 3
          Here is a good whiteaper on the subject. It is for Flex 1.5, but the principles still hold for 2.0.

          You can access the properties and methods of individual swfs, as long as they are AS3, not AS2. This is a valid approach for larege apps.

          • 3. how to design a flex app so that it loads fast
            CoolCountDracula Level 1
            thanks man that was so much help. hope they update it for flex 2.

            also couple of queries.
            1.) does the form container carry the same overhead as other containers. (if not flex builder shud have stuff like auto layout and then when you are happy with layout you can set stuff to absolute layout and it auto fills widths, heights, x and y)

            2.) if i create components thru code as like in a for loop load time wud be same for 2 or 100 or 10000 components right.

            3.) another question similar to 2 is that if i dont use any outside controls load times shud be almost same for small app and large apps since all i am doing create instances of already existing control classes.

            4.) if i break down my app into components and then load them as needed wud it be same as creating each as a swf and loading them.

            5.) is layout using self written code faster than auto layout. (for simpler forms)

            6.) is creating controls via AS faster than creating them mxml.

            7.) is there any pauserefresh / pauselayout for when you want to add a lot of stuff and dont want to do auto refreshes.

            10x again for that link

            i will be posting my own research into optimizations in this thread too as i proceed with these apps
            • 4. Re: how to design a flex app so that it loads fast
              ntsiii Level 3
              1) Yes. the lightest wieght component is Canvas, since it does not need to calculate layout

              2) Creating components dynamically saves time on the initial load. this often results in a better user experience. Tthis is the reason for the default deferred instanitation behavior of many containers.

              3) The speed to dispaly an app is primarily bound by the rendering speed of the Flash Player. This is why large lists or repeaters can be so slow. To optimize speed, reduce rendering.

              4) Your apps initial load speed will be faster, but there will be a bit of a lag while the player renders the loaded app. This is assuming you are using SWFLoader. Using components in a standard container, like ViewStack depends on the creationPolicy of the container.

              5) Fastest layout is canvas, where you must specify (x,y)

              6) There is no difference. By the time the control gets to the client it is SWF. Compiling mxml is slower than AS because the mxmlis first generated as AS, then compiled into the swf.

              7) I don't know!

              Looking forward to your results.

              • 5. Re: how to design a flex app so that it loads fast
                CoolCountDracula Level 1
                10x mate u r the king of flex