3 Replies Latest reply on Feb 6, 2010 4:49 PM by Michael Gannon

    Load time/background loading

    Michael Gannon Level 1

      I wish there was a way to customize the way a published catalyst site loads. For instance if you were building a website you could set it to load the home page first and then start loading other pages in a specified order in the background. This way a user doesn't have to wait for the entire site to load before they are able to view anything.

        • 1. Re: Load time/background loading
          acath Level 4

          Hi Michael,

           

          There is a lot of information available about optimizing the startup time of your application. Unfortunately, most of it is written for programmers, since traditionally they have been the ones responsible for deployment and performance.

           

          Here is Adobe's documentation for Flex 3. Most of it should still be relevant:

          http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_02.html

          What I'm about to explain is a bit subtle, as we consider this one of the more advanced parts of FC:

           

          Flex actually DOES defer loading the other pages until you need them, but this is sensitive to the way that you've set up your project. There are some steps you can take to optimize load time in FC.

           

          Basically, you want to ensure that objects only exist in the pages (aka state) in which they are used. FC's UI doesn't draw a strong distinction between an object EXISTING in a state and an object BEING VISIBLE in a state, but they are two different things. If an object does not exist in the current state, it will be grayed out in the layers panel and its eyeball will be off. If it is merely hidden, it will be black and it's eyeball will be off or grayed out. Confusing, I know. Sorry =).

           

          To remove an object from a state, select it and press the delete key on your keyboard. You should see it become gray in the layers panel.

           

          You should do this for all the objects that don't exist in the first state. However, beware: this will effect your timelines. In particular, if you have an object hidden in Page1 at a certain position, and visible in Page2 at a different position, the timelines panel will create a Fade In AND a Move effect for the Page1 > Page2 transition. However, if the object does not exist in Page1, it also doesn't have a position in Page1, and therefore you will not see a move effect.

           

          If you minimize the number of objects in Page1, you should see a noticeable improvement in startup performance. Good luck!

           

          -Adam

          • 2. Re: Load time/background loading
            Michael Gannon Level 1

            Thanks for the response. I didn't realize there was a difference between an item existing in a state and being visible in a state. I'll go through my project and remove all of the unneeded items from each state and see if it makes a noticeable difference in load time. I suspect it will since I'm using quite a few rather large images in my project and only one of them is needed for the home page.

             

            Thanks again

            Mike

            • 3. Re: Load time/background loading
              Michael Gannon Level 1

              Well I went through my project and made sure all the objects were removed (use delete key to grey out layer), and it did seem to help. My non scientific research estimates I went from about a 27 second load time to about a 10 second load time.