9 Replies Latest reply on Aug 10, 2007 10:04 AM by Newsgroup_User

    Performance Issues

    sarah louise water

      Could anyone please help.

      My movie is going to be very large - it uses a couple of xtra's for a database and printing.
      The movie has a menu, and 47 lessons, for example I have only 11 lessons completed and have used over 680 markers. it is already showing signs of slow performance. This is very distressing as I have invested a lot of time and energy into it.

      I understand that a movie can be split up using MIAWS but the functionality seems to disappear, it also affects the score tracking system.

      I have tried placing a preload function at the start of every lesson.

      Is there any way, using casts etc that I can speed things up.

      Any suggestions would be greatly appreciated.

      Many Thanks
        • 1. Re: Performance Issues
          Level 7
          You should split your file into many smaller files, each representing a
          complete piece of functionality. You can seamlessly navigate between
          them using the 'go to movie "name"' command - this does /not/ require
          MIAWs. You should also create a fast-start stub projector for testing so
          that you don't have to keep building an executable, but rather an build
          one, once, and use it to test your movies from a projector environment
          instead of the authoring environment.
          Finally, remember to "Save and compact" often, as this will regain some
          file size if you have imported and deleted largish files (like bitmaps
          and sounds)
          • 2. Re: Performance Issues
            johnAq Level 1
            Just a thought - if you are using a database, are you doing a lot of heavy text member formatting?

            I once had a project that got gradually slower and the size of a text member i was always updating and formatting got very big - it seems to accumulate something as it goes. I ended up always duplicating the member for formatting and reclaimed a lot of speed.


            • 3. Re: Performance Issues
              sarah louise water Level 1
              Thank you very much for the responces posted by members.

              The database is just small functions saving each lesson result generated. This only occurs if someone completes a lesson.

              The speed problem happens during a lesson further along the score - such as Lesson 8, the user presses the check answer btn - which then turns into a next question btn. The next question trigger is very slow, about 10 seconds to go to next marker.

              In the previous lessons this is very quick.
              • 4. Re: Performance Issues
                Level 7
                I have done many projects like what yours sounds like. The best way I
                have found is to have each module be it's own dir file. Any time you
                need to go to the next module, you can open if with the command

                go movie "module2"

                Any shared members or scripts can be placed in one or more EXTERNAL
                casts. All of the modules that need those assets can have that external
                cast included. any global variables that you use will be carried over
                into the next movie, so your scoring should still work.
                • 5. Re: Performance Issues
                  sarah louise water Level 1
                  The movie would have to be split up as follows - User Login (database related) and Menu movie. Each seperate lesson a seperate dir with it's own external cast.

                  So, if I have a stub projector that opens the Menu and login page (database related). Can I then access each seperate dir lesson files from the menu.

                  Also, am I correct in thinking that all the score tracking and database functions should be stored in a globally related External cast file or should they reside in the Menu file.
                  I am new to external cast scripting.

                  Many thanks again for everyone's help.
                  • 6. Re: Performance Issues
                    Level 7
                    External casts work exactly the same way as internal ones. The only
                    difference is that they are not built into the compiled movie, and can
                    be shared between multiple movies. You would put any scripts or members
                    that need to be in all the movies. If you have a text member, for
                    example, that displays the score, and the score needs to be displayed in
                    all the modules, then put it and it's script in an external cast. Then
                    you can use the exact same member in all the movies, and they will all
                    work identically.

                    Just remember to include the cast with your final deliverable. Since it
                    is external, it is not built into the projector or shockwave file.
                    • 7. Re: Performance Issues
                      James Newton, ACP Level 3

                      Originally posted by: sarah louise water
                      The speed problem happens during a lesson further along the score - such as Lesson 8, the user presses the check answer btn - which then turns into a next question btn. The next question trigger is very slow, about 10 seconds to go to next marker.

                      What exactly is your "next question" button doing in lesson 8? It may be that the performance issue is due to the specific Lingo that you are executing at this point, rather than the way your movie is organized. The more details you can provide, the easier it will be to trouble-shoot.
                      • 8. Re: Performance Issues
                        sarah louise water Level 1

                        I have started to split up the lessons but am having trouble with the global functions.

                        I have a lot of functions resting inside onStartMovie, onStopMovie, especially regarding the database.
                        It seems the database closes and I lose user login data (just a name), when navigating to the lesson, this means no scores are being saved etc.
                        The project so far is as follows - Movie 1 - Projetor Stub
                        Movie 2 - Menu
                        Movie 3 - Lesson 1
                        Movie 2 and 3 share a global cast and when I open Movie Lesson 1 from within the Menu movie I lose the active data and the database connection.

                        I know this is an error on my part.

                        • 9. Re: Performance Issues
                          Level 7
                          If your data is stored as a global, then it should not be lost between
                          movies, unless you are resetting the global when the new one starts up.
                          Instead of always setting a variable like the score to 0 on startMovie,
                          you can do so only if it is void. If there is already a score, then
                          just keep it. Something like this:

                          global gScore

                          on startMovie
                          if voidp(gScore) then gScore=0

                          The fact that you are losing the database connection may also be because
                          you are resetting everything on startMovie (or wherever you do the
                          initial database connection)