5 Replies Latest reply on Apr 20, 2010 7:37 AM by Ansury

    Performance Of Flex Application?

    maan82 Level 1

      Hello all

          Recently I went through video tutorials of flex and found it to be great.But I have one question regarding performance. If I am not wrong then Flex application works like this, Entire application is converted into swf file and for navigation between pages of application there is concept of states.Whatever data is required for different states is  get by using HTTPService,WebService etc . wheras if  we talk about normal web application built using PHP every page and data is loaded from server .For each navigation, data plus markup(HTML/DHTML CSS javascript etc.) to show that data or content is loaded.It has a benefit of downloading only that part of application which is required.

             For example if we have shoping store applicatiion and it has a search page and product list page to display products list in different formats like grid or table then markup plus data in normal web application will be loaded with each request.If user click on search page only then that  page is loaded from server and if user want to view the search results in table format only then that page is loaded.

         I want to know how this work in Flex application.For data part It is clear that for each state whatever data is required is get by using services like HTTPService,WebService etc. But how state presentation part is get?Is the entire swf file containing all states related information is loaded before running the applicatio? For example as in our previous example presentation part of all states like shopping store serch state, product list in table format state and product list  in grid format state in the begining of application .later on if user click on search link it will already have that state view information and it will get data for search  part and put that data into view and present it to the user.For search result also it will  be already having information about how to present that data  so it will get data  only and present it to user.

          If Flex works as i stated above then if we have very big application with many different stats then user has to wait for the loading time off all the states.Or there is provision for some backgroud loading of states that as soon as user request the application first time he gets the first view and then on other states are loaded in backgroud?

         If all the states are loaded at begining of application then what will be performance of application with many states?(Means in that case swf file of compiled application will be of big size and it will take time to load in browser.)

        can anybody tell  me about all  these things in detail.I am sorry if my understanding of Flex is wrong.I am newbie.

      Thanks in advance .

        • 1. Re: Performance Of Flex Application?
          Flex harUI Adobe Employee

          You can break up a single SWF into multiple SWFs using the Flex concept of

          Modules.  And because you have smart code running, you have the option of

          pre-fetching some of those modules while the user is interacting with the

          current UI.

          • 2. Re: Performance Of Flex Application?
            maan82 Level 1

            Thanks for your reply

            can you please provide me any link where all this is explained in detail.Any demo application of that type will be of great help.Thanks once again.

            • 3. Re: Performance Of Flex Application?
              Flex harUI Adobe Employee

              See the documentation for mx:ModuleLoader and mx:Module.

              • 4. Re: Performance Of Flex Application?
                injpix Level 3

                In an addition to what Flex harUI mentioned, if you are looking for a 3rd party framework that support Modules, there is PureMVC MultiCore.

                • 5. Re: Performance Of Flex Application?
                  Ansury Level 3

                  This seems more of an RIA performance question than a Flex specific one.  Honestly though, modules aren't needed often in my experience (depends greatly on requirements).

                   

                  You say that "only the part of the application that is needed" is downloaded, while this is technically true (a bit of an oversimplification as there are other advantages to be had from RIAs), you still have the round trip time required for every single request to the server.  Since an RIA is generally a single bulk download (which may not even be needed if there's caching going on), usually you're talking about a single wait of a few seconds for loading vs multiple waits of a few seconds for page refreshes. 

                   

                  Even if the initial load time is as much as ~10 seconds (for the first visit), does that outweigh the 1 to 3+ second page refresh penalty constantly interrupting the user's work flow over time?  Also consider Flex's AMF protocol, which blows competing formats (esp XML based) out of the water on performance.  RIAs (especially Flex) win the performance game.