Home Page · Up One Level · Site Map · Send Us email


Faster is Better

Many MediaMogul titles are scripted for function, without much attention to optimizing performance. In many titles, the symptoms of "slow branching", "menus slow to get a cursor", "slow plug-ins" and other performance issues are often due to what we call "loose" scripting. Many times, too much time is given for still images to load, for menus to load, plug-ins to load and become active, etc. There are a number of things that can be done to improve performance. Here are a few of the top "improvers"


The first line in the script should start at 00:00.

As simple as this may sound, we have seen a fair number of titles where the first line in a script was inadvertently at 00:20, 01:00, and even 04:00. Since MediaMogul takes time LITERALLY, it quickly enters the script, only to be told to sit and wait.

Good Example:

00:00 Cut /h0/VIDEO/booboo.d
00:00 Play /h0/MUSIC/boo.cm


Bad Example:

00:20 Cut /h0/VIDEO/booboo.d
00:20 Play /h0/MUSIC/boo.cm



When presenting menu s or other sequences where the user is waiting to interact, use the SHORTEST load times that pass analysis.

Note that the load table (laminated card) is based on DYUV or CLUT images that are about 100k bytes. For Run-Length images, the load times can be significantly shorter. We use the rule of one frame (00:01) for every 5k for an audio level of NONE or C, or two frames (00:02) per 5k up through ASTEREO. A 20k RL7 image with no audio would need just 00:04 to load.
Good Example:

00:00 Cut /h0/VIDEO/booboo.rl7
00:04 Background /h0/MUSIC/booback.rl7
00:04 Wait /h0/MENUS/boomenu.m


Bad Example:

00:00 Cut /h0/VIDEO/booboo.rl7
00:20 Background /h0/MUSIC/booback.rl7
01:10 Wait /h0/MENUS/boomenu.m



The "Load Time" for a command and asset is in the column PRECEDING (Script Writer).

MediaMogul must have sufficient time to load the asset BEFORE the desired presentation time. For example, a DYUV still image that is to begin a dissolve at 04:00, must begin loading into the machine by 03:13. An that's if there was no audio playing WHILE the still was loading (not during the dissolve). MediaMogul looks ahead in the script to assure things arrive on time, but it must be given sufficient time by YOU to accomplish this.
Example:

Script File Produced:

00:00 Cut /h0/VIDEO/baithouse.d
00:02 Change_crsr /h0/CURSORS/mycursor.c
00:22 Cut /h0/VIDEO/townfor.cl7
00:27 Background /h0/VIDEO/townbck.rl7
00:27 Wait /h0/MENUS/mymenu.m

baithouse.d is at the front of the script, so Mogul just waits until it's loaded before starting the timer. cool_strm.cm requires no load time. mycursor.c is a small file (under 10k), so we allowed 00:02 of time for it to load from the CD. Note that the 00:02 was specified in the column BEFORE mycursor.c.

townfor.cl7 is loaded after mycursor.c loads, and is allowed 00:20 to get off the CD, given its size (about 100k) and the fact that CMONO audio is now playing while it's loading. Again, the 00:20 is specified in the column BEFORE.

Lastly, townbck.rl7 and mymenu.m are loaded, one after the other. Since townbck.rl7 is smaller (less than 20k), it only needs about 00:05 after townfor.cl7 to get off the CD. mymenu.m has all the time in the world, since it's at the end. That's why it can be scripted at the same start time as townbck.rl7.



"Hide" subroutine loading, if possible. Call Customer Support is you are unsure how to accomplish any of the following.
- Load as many background plug-ins as possible (Call_bg) in an init or splash-screen script when the title is started.
- If memory permits, make often used plug-ins "sticky" so they do not have to be loaded over and over again.
- Some plug-ins may be scripted as background calls (Call_bg), even though the documentation recommends a foreground call.
- If you can anticipate where plug-ins are going to be used, you may be able to script them as background calls during preceding scripts.
- Many plug-ins can be scripted back-to-back with NO time between columns (Script Writer). This especially applies if the plug-ins are not related or related but not dependent on each other.
- When the documentation recommends that a background plugin be given a certain amount of time to load and "wake-up" (00:20 is common), you can script it just before a branch and use the branch delay for wake-up.



Any script command that does not load an asset (audio, video, menu or data file), can be scripted for a COLUMN duration time of 00:00.
Example:

Script File Produced:

00:00 Cut /h0/VIDEO/baithouse.d
00:00 Set_var A 1
00:00 Cursor_off
00:05 Background /h0/townfor.cl7
00:05 Wait /h0/MENUS/mymenu.m


Note that set_var and cursor_off require nothing from the CD, and are set to execute at the same start time as the cut to baithouse.d. Mogul will execute them in order, without any scripted time delays between them. townfor.cl7 however, is loaded from the CD and requies about 00:05 to load.

Menu files require no additional SCRIPTED time to load.

For example, for a menu with a foreground, background and menu file, the background and menu file can be loaded in the same column (same time).



Calls do NOT require load time, but may require "wake-up" time.
During a branch, MediaMogul scans the upcoming script for Call and Call_bg commands. It preloads the plugin(s) needed BEFORE time 00:00 in that script commences. The individual plugin is not attached and RUN until the appropriate Call command is reached in the script. Once called, the plug-in may or may not require a wake-up period to prepare for work--follow documentation recommendations.


A script demonstrating many of the above techniques might look like:
00:00 Dissolve /h0/VIDEO/mine.d 00:15
00:00 Skip_off
00:00 Call_bg /h0/SUBROUT/cdi_sgmn
00:00 Play /h0/AUDIO/mine.cm
00:00 Cursor_pos 300 200
00:00 Set_var A 3
00:10 Call_bg /h0/SUBROUT/cdi_dimr 20 30
00:18 Background /h0/VIDEO/mineback.d
00:18 Wait /h0/MENUS/mine.m

In this example a number of asset-less commands are hidden during the dissolve and audio play. The foreground and background pictures are enough apart to still pass analysis. Notice that cdi_sgmn (signal manager for plug-ins) and cdi_dimr (screen dimmer) are 00:10 apart to permit proper wake-up for the signal manager. The dimmer is started up 00:08 before the menu is loaded to permit to wake-up in time and see that a menu is active.


Home Page · Up One Level · Site Map · Send Us email