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
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
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.
- 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.
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.
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