Performance Issues? (Things You Can Do To Improve Performance)

Last updated on 11/20/2010

Stykz is very functional and performs well on most systems. However if you have an older system, or one with a smaller amount of RAM, or are just interested in squeezing out the best performance possible, you can follow some or all of the steps below.

Before we get started, there's a few things to keep in mind related to increasing performance in Stykz - Stykz loads everything into memory (RAM) as you open things, and does its best to purge them from RAM when you close them. If you don't have enough RAM, the operating system will start to use the hard drive in place of memory (called "virtual memory" or "swap space") - and it's a lot slower to access the hard drive than it is to access RAM. So doing things to cut down RAM usage in Stykz will help. Also be aware that animation (by definition) is a visual medium - so having a decent graphics processor will help as well.

Work on One Document at a Time

Every document you open in Stykz uses some amount of RAM. The more frames it has, and the more figures you have on any given frame, the larger the size of the file on disk, and the more memory it will need to keep it open. So unless you need to copy and paste between documents, working on one document at a time will minimize this memory hit.

Close the Frames Palette If You Don't Need It

Whenever you change something on the current frame, Stykz will update the current frame thumbnail on the Frames Palette (called the "frame slot"). This updating is called the frame slot redraw. When frame slot redraw occurs, it effectively takes a snapshot of the current frame, resamples it to a smaller size, and draws it in the frame slot. This means that it will need a certain amount of memory to hold the full size snapshot before it gets resampled - and the larger the stage size, the larger the snapshot is and the more memory it will need to hold it, even if it is only for a short time (the full size snapshot is purged from memory after it is resampled).

However, Stykz will only update the thumbnail for the current frame under these circumstances:

  1. The Frames Palette is visible
  2. The Frames Palette is scrolled so that the currently displayed frame on the Stage is one of the visible frame slots in the Frames Palette.

So if you hide the Frames window (choose Window > Frames), Stykz will not attempt to update the frame slot. Remember that although the "New Frame" (or "Next Frame") button on the Frames Palette is tempting to use to navigate to the next frame, and clicking on a frame slot is convenient to go to a specific frame, there are menu and keyboard options you can use instead to help you navigate while the Frames Palette is closed:

  • To get to the next frame or create a new frame (if you're currently displaying the last frame of the document), you choose Edit > Next Frame (or Edit > New Frame), or type Cmd-Shift-N (Mac) or Ctrl-Shift-N (Win). You can also hit the Enter key on the keyboard.
  • You can use the comma (,) and period (.) keys (the ones with the < and > symbols on them) to navigate forward and backward one frame at a time: typing comma (,) will move you back one frame and typing period (.) will move you forward one frame.

Be aware that as soon as you open the Frames Palette, it will draw the thumbnails for the slots that it is currently displaying, and when you scroll the Frames Palette and release the mouse, it will do it again (but only for those slots being shown).

Keep the Stage Size As Small As You Can

The larger the stage is, the larger the number of pixels needed to draw what's on the stage. This also means that updating the Frames Palette will need that much more memory when the current frame's snapshot needs to be taken (see Close the Frames Palette If You Don't Need It, above). So the default stage size of 700x500 in Stykz uses 350,000 pixels, if you "double" the size of the stage to 1400x1000, what you're really doing is increasing the number of pixels by 4x, not 2x since 1,400 x 1,000 = 1,400,000, which is the same as 350,000 x 4. So the smaller the stage size, the less pixels and the less memory needed to draw.

To adjust the stage size, see Setting Stage Properties, and to change the default stage size for new Stykz documents, see Setting Preferences: General.

Change Selection Method to "Enclose"

Stykz has two different methods of selecting figures on the Stage - intersect and enclose (these are covered more fully in the Setting Preferences: General topic.) The default is intersect, but that requires more processing the see if figures are currently intersecting the rectangle. Choosing enclose requires less processing power and memory as well (although you have to fully enclose figures inside the selection rectangle to have them be selected. To change the selection method, go to Edit* > Preferences... >> General > Selection method and choose "Enclose".

Turn Off Tool Instructions

Once you are familiar with how the tools work, you should turn off tool instructions (covered in the Setting Preferences: Tool Options topic). Doing so will improve performance a bit as the special tool instruction windows will not need to be displayed.