Friday, September 18, 2009

Optimize performance in Photoshop CS4 on Mac OS

As the title suggest and the link to that article here. I have also copied some of the stuff to be documented below just in case that article decides to disappear. I have been using the Mac for almost a month and found an article which I hope you will benefit from as well. Please note that this is NOT written by me.

Some facts and figures:

1. The maximum file size Photoshop CS4 supports is 300,000 x 300,000 pixels, except for PDF files, which are still constrained by a 30,000 x 30,000 pixel, and a 200 x 200 inch limitation.

2. File size capability for Photoshop CS4, PSD files: 2 GB and TIFF files: 4 GB

Note:
Most applications cannot work with TIFF files larger than 2 GB.

Setting scratch disks

A scratch disk in Photoshop is similar to virtual memory in Mac OS. For the best performance, you should set the primary scratch disk to a defragmented hard drive that is not running the operating system and that has plenty of unused space and fast read/write speeds (rather than a network drive or removable media). Photoshop requires at least 2 GB of free hard-disk space, but more is recommended. The OS volume should contain at least 20 GB of free space to ensure that the virtual memory system has plenty of available hard disk space. If you have more than one hard drive, it is suggested that you specify additional scratch disks.

Fast RAID 0 arrays are the best option for scratch disks, especially if the array is used exclusively for your scratch disk, is defragmented regularly, and is not your boot volume, especially if your efficiency goes much below 90%. Photoshop CS4 supports up to 64 Exabytes (EB) of scratch disk space on a total of four volumes. (An EB is equal to 1 billion gigabytes.)

To set the scratch disk preference:

  1. Choose Photoshop > Preferences > Performance.
  2. Check the Active box for each hard disk you want to contain a scratch disk.

    Note: Unless you have a drive that has considerable space open and is defragmented regularly, choose more than one drive, if one or more is available.

  3. Click OK.
  4. Restart Photoshop.
Adjusting the Cache Levels

Photoshop uses image caching to redraw high-resolution images on-screen faster. With caching, Photoshop quickly updates a low-resolution version of an image as you edit it. To enable the Cache Levels option, specify the number (1 to 8) of low-resolution versions you want Photoshop to store (cache). The more versions you specify, however, the slower Photoshop will open image files. The Photoshop CS4 default Cache Level setting is 4. Setting the Cache option to 1 disables caching; only the active screen image is cached. Setting the Image Cache higher than 4 improves the performance when working on larger images by redrawing them faster.

If you use files that have small pixel dimensions and many (50+) pixel layers, you'll get the best performance if you set the cache to 1 or 2. If you use files that have large pixel dimensions, set the cache higher.

Note: Image Caching may cause a less accurate preview. When needed, view files at 100% to ensure an accurate preview.

To adjust the Cache Levels setting:

  1. Choose Photoshop > Preferences > Performance.
  2. Enter a value from 1 to 8 in the Cache Levels text box. Click OK.
  3. Restart Photoshop.
Set Maximize PSD And PSB File Compatibility to Always or Ask

Maximize PSD and PSB File Compatibility increases the size of your file by attaching a flattened copy of your image when you save your image. A small amount of extra data is included in the file when you choose this option that ensures that PSD and PBS files saved in Photoshop will open in previous versions. Additionally, if you want to use the Edit in Photoshop feature in Photoshop Lightroom, this option needs to be on.

To change the Maximize File Compatibility option:

  1. Choose Photoshop > Preferences > File Handling.
  2. Change Maximize PSD And PSB File Compatibility to one of the following:
    • Ask: Prompts you to maximize file compatibility when you save.
    • Always: Saves with maximized file compatibility without asking.
    • Never: Does not save or prompt you to save with maximized file compatibility.
Image window management

Image windows use more RAM in Photoshop CS4, than in previous versions, and is especially true if the Application Frame is selected. The Application Frame makes every tabbed image the size of the entire monitor. When you open the same number of images that you opened in previous versions of Photoshop, you may now get an Out of RAM error message, or Photoshop might run slowly. If this occurs, close some image windows, and/or turn off Application Frame.

GPU use

Photoshop CS4 leverages the graphics display card's GPU, instead of the computer CPU, to speed its screen redraw. For Photoshop to access the GPU, your display card must contain a GPU that supports OpenGL and has enough RAM to support Photoshop's functions - at least 128 MB, and a display driver that supports OpenGL 2.0 and Shader Model 3.0.

There can be incompatibilities among the components that allow Photoshop to use the GPU. You may experience issues such as artifacts, errors, crashes, Photoshop closing without an error, and slow downs. If any of these occur, update your display driver and see "GPU and OpenGL Features and Limitations in Photoshop CS4" (TechNote kb404898).

Minimizing palette preview thumbnails

Photoshop requires additional memory to display preview thumbnails in the Layers, Channels, and Paths palettes. Photoshop updates the preview thumbnails as you make changes to an image. The more preview thumbnails Photoshop displays, and the larger their size, the more memory Photoshop requires to draw and update them.

To minimize or disable thumbnail previews in palettes, choose Palette Options from the palette pop-up menu, select the smallest size or None for Thumbnail Size, and then click OK.

Out of RAM errors running filters, 3D, Content Aware Scaling, Liquify

When you use the various features which are memory-intensive, such as Content Aware Scaling, 3D, Liquify, and filters such as the Distort filters, on a computer running 32-bit Windows, with low RAM, or low open hard-disk space, Photoshop responds slowly or not at all. These features can require more than the recommended minimum amount of RAM and disk space for Photoshop. If Photoshop responds slowly when you use the these features, increase memory used by Photoshop, or free additional space on the hard disk.

For instructions on how to increase memory used by Photoshop, see "Allocating more memory to Photoshop" in this document.

16-bit and 32-bit functionality

Photoshop CS4 increases the number of features that can be performed on 16-bit images and allows numerous operations to be performed on 32-bit images. However, if your resources are low, reducing your images to 8-bit can improve performance. Note that this reduction will permanently delete the extra bit data from your image.

Deselecting Export Clipboard

The Export Clipboard setting allows Photoshop to export anything copied to the clipboard as a PICT file. Exporting is time consuming, however, and occurs whenever you quit Photoshop or go from Photoshop to another application. Deselecting this setting increases the performance of Photoshop.

To deselect Export Clipboard:

  1. Choose Photoshop > Preferences > General.
  2. Deselect Export Clipboard.
  3. Click OK.
Use font management software and turn off the WYSIWYG font list
  1. Your computer may operate slowly if there are too many active fonts on the system. Font management software allows you to deactivate the fonts you aren't using to speed up the computer. Turning off the WYSIWYG font preview list will also speed the processing of fonts in Photoshop.
  2. To turn off the font preview:
  3. Choose Photoshop > Preferences > Type.
  4. Deselect Font Preview Size.
Bigger Tiles plug-in

The Bigger Tiles plug-in, which is located in the Optional Plug-ins folder on your application DVD, is disabled by default. When you enable it by copying it to the Extensions folder under your Photoshop CS4 Plug-ins folder, and by removing the tilde (~) from the file name, you increase the image tile size in Photoshop. You should only enable the plug-in if you have more than 1 GB of RAM installed.

If you enable the plug-in, then Photoshop redraws more data at a time because each tile is larger, and each tile is drawn, complete, at one time. Photoshop takes less time to redraw fewer tiles that are larger, than it takes to redraw more tiles that are smaller. Because Photoshop redraws more data at one time, each tile takes longer to be redrawn, so bigger tiles can look like they are redrawing more slowly -- and in fact it can take longer before you see the results on the screen if you're making repeated, small adjustments to a slider in a filter or panel, because an entire tile has to be calculated and drawn before you see anything. But the total time it takes to compute and draw the final image will be less. Screen updates while painting may also be less smooth with Bigger Tiles installed.

If you spend most of your time painting or rapidly tweaking controls in filters or panels and watching the feedback, then Bigger Tiles is not going to help you. But if you spend your time watching progress bars march across the screen, Bigger Tiles can save you time.

Image files

You can optimize your workflow to improve the performance of Photoshop by minimizing file size, editing individual channels, and using image compression selectively. Additionally, because layers and channels significantly add to the size of a file, you can minimize file size by merging layers and deleting channels when they are no longer needed. Finally, if you are preparing images for color separation, you can work in RGB mode until you are ready to print, and then change the images to CMYK mode. When converted from CMYK to RGB, a file's size should decrease by about 25%.

Minimizing resolutions

You can minimize the size of your files by reducing their resolution, which is measured in pixels per inch (ppi). Photoshop requires more memory and disk space to process high-resolution images, which increases the time it takes to display, process, and print them. Increasing the resolution of an image does not always improve the quality of the image, but may instead only increase its file size. You want the resolution of images to be the highest value your printer can use. Resolutions higher than that only add information that your printer can't use, but must process, thereby increasing print times.

The optimal resolution for your images depends on the type of printer you use.

Fixed screen printers, such as imagesetters and laser printers:

For these printers if you are printing continuous-tone images, such as photographs, use a resolution of 1.5 x 2 times the screen frequency, measured in lines per inch (lpi), that you'll use to print the image. For line-art images, such as drawings, use the same value as your printer's resolution, measured in dots per inch (dpi). For example, if the resolution of your printer is 600 dpi, and you plan to print the image using the printer's default screen frequency of 85 lpi, save continuous-tone images at a resolution between 127 ppi (85 lpi x 1.5) and 170 ppi (85 lpi x 2), and save line-art images at a resolution of 600 ppi.

Output - fixed screen printers Recommended Resolution
300 dpi laser printer 100 ppi
600 dpi laser printer 150 ppi
120 dpi or higher image setter 1.5 - 2 times the screen frequency you specified

Inkjet printers:

180 dpi is a reasonable lower bound for good results regardless of the printer's stated resolution, though images without much detail may look good printed at resolutions as low as 120 dpi. Critical reproductions of images with lots of fine detail could require 300 dpi. Improvements from printing continuous tone images at resolutions beyond approximately 300 dpi becomes increasingly difficult to see. It's also difficult to see much advantage from resizing the image to a specific multiple or fraction of the printer's resolution. A common method is to set the image size (without resampling) to the size of the print they want, and as long as the resulting resolution falls in the 180-400 dpi range, let the printer handle it. If you need more critical results, you can resample the image to an even fraction of the printer's stated resolution (e.g., 360 dpi for printing line art for printing on a 720 x 1440 dpi printer). Both resolutions higher than 300 dpi, and picking an image resolution that is an even fraction of the printer's stated resolution, may be more visible with finely tuned detail line art and text than with continuous tone images.

Fixed pixel printing devices, such as dye sublimation printers and some film recorders (Durst Lambda, Lightjet):

These printing devices provide significantly better quality if the image is the same resolution as the printer or imager, typically 300-400 dpi. Resolutions even slightly higher or lower can significantly degrade results, so it's worth resizing to the exact resolution in Photoshop.

For best printing results, perform a sharpening step appropriate to the specific output device after the last time you use the Image Size command.

To reduce the resolution of an image in Photoshop:

  1. Open the image, then choose Image > Image Size.
  2. In the Image Size dialog box, decrease the Resolution value, and then click OK.

For more detailed information about image resizing and resampling, see "Resize and Crop images in Photoshop and Photoshop Elements" (TechNote 331327).

Purge Undo, Clipboard, or Histories

Undo, Clipboard, and Histories all hold image data. To release RAM, choose Edit > Purge to purge the Undo and Clipboard. Purging Histories can release RAM or scratch disk depending on how recent your history data is. To reduce disk space usage, reduce the number of History States available in the General preference.

Reduce the number of History states

In Photoshop CS4, each history state that includes an operation that affects the entire image (for example, when you apply Gaussian blur or unsharp mask to the entire image) creates a full copy of your image at its original size. If your initial image is 500 KB, and you apply Gaussian blur to it, your image will need 1 MB of scratch space. If your history states consist of operations that affect only part of the image, such as paint strokes, only the size of the tiles touched by the strokes are added to the image size. If you count up the number of histories you have where operations have affected the entire image, and multiply your original image size by that number, you'll have an approximate amount of scratch disk space the image will need. If you have applied levels, a reduce noise filter, and an unsharp mask filter to your entire image that's 5 MB in size, the image will need 20 MB of scratch space. When you reduce the number of history states available, you potentially reduce the number of copies of your image using scratch space.

Reduce patterns and brush tips

If you need to reduce your scratch disk overhead to a minimum, you can minimize the number of patterns and brush tips you use in each of your presets, and you can reduce the number of patterns you use in your image's Layer Styles (as applied with the Bevel and Emboss Texture or in the Pattern Overlay). Each small pattern and sampled brush in the presets uses at least one tile for storage. Patterns used in Layer Styles take extra RAM, as well.

The full set of original patterns are in the preset labeled Patterns. Select it from the pop-up menu in the Preset Manager.

Minimizing the number of layers

Layers are fundamental to working in Photoshop, but they also increase file sizes and redraw time because Photoshop recomposes each layer after each change in the image. After you have completed changes to layers, you can flatten (merge) them to reduce the size of a file. You should also make sure to remove blank layers from the file since they too increase its size. It is important to remember that Photoshop does not let you separate layers after merging them. Instead, you can either use the Undo command or you can use the Photoshop History palette to reverse a merge.

If you do not need to frequently change some of your layers, you may want to convert layers or layer sets into Smart Objects, to save disk space and help increase speed.

To flatten all layers in a file, choose Layer > Flatten Image.

To merge a layer with the layer below it:

  1. In the Layers palette, select the layer above the layer with which you want to merge it.
  2. Choose Layer > Merge Down.
Flattening TIFF files

Photoshop allows layers to be saved in TIFF files. Layered TIFF files are larger than flattened TIFF files and require more resources for processing and printing. If you work with a layered TIFF file, save the original layered file as an Adobe Photoshop (.psd) file; then, when you are ready to save the file in TIFF format, save a copy without layers.

Using image compression

Although compressed files generally have smaller file sizes, Photoshop may take longer to open or save them. With the exception of images saved in Photoshop format, Photoshop must decompress a file to open it and then recompress the file to save it. The BMP, CompuServe GIF, JPEG, Photoshop, Photoshop EPS, Photoshop PDF, and TIFF formats can be saved with compression. In addition, Photoshop enables you to specify a compression method for TIFF layers in the TIFF Options window. You can improve performance by saving your file in compressed Photoshop format (a compression format in which there is no data loss) as you work, and then save your file in the format you want when you are finished editing the image.

To save an image without compression from Photoshop, choose File > Save As, select the format you want, and then select the No Compression option in the format option dialog box. For example, select the TIFF format, and in the TIFF Options dialog box, select None for Image Compression.

Editing individual channels

Photoshop requires less memory to apply a filter to a single channel than it does to apply a filter to multiple channels or to an entire image (composite channel). In a flattened image, each RGB channel is about one-third the size of the file; each CMYK channel is about one-fourth the size. To edit a single channel, select the channel you want to edit in the Channels palette.

Using the Filter Gallery and applying filters to individual channels

The Filter Gallery in Photoshop CS4 allows you to test one or more filters on an image before applying the effect(s), which can save considerable time.

Dragging and dropping between files

Dragging and dropping layers or files is more efficient than copying and pasting them. Dragging bypasses the clipboard and transfers data directly. Copying and pasting can potentially involve more data transfer and may take more time.

Operating system software

By customizing your system so it runs efficiently, you can increase the amount of memory available to applications, and ensure that applications will run efficiently. By increasing the amount of memory available to Photoshop, allocating more memory to it, quitting applications you are not using, or disabling nonessential extensions, you improve the performance of Photoshop.

Run Apple periodic maintenance scripts to clean logs and temporary files

Mac OS X performs background maintenance tasks overnight. If your computer is turned off or in sleep mode at night, then the maintenance tasks are not performed. Run a utility, such as CronMaster, to manually perform these tasks, or enter the commands using the Terminal. For further information, read document #107388, "Mac OS X: How to force background maintenance tasks (logs and temporary items)" on the Apple support website at www.apple.com/support/ .

Check your system for damaged fonts

If there is a damaged font on your system and you have WYSIWYG font preview turned on, your computer can slow significantly. If you turn off font preview and your computer performance improves significantly, test for a damaged font.

Allocating more memory to Photoshop

Photoshop uses random-access memory (RAM) to process image information. The more RAM available to Photoshop, the faster Photoshop can process image information. Other open applications and startup programs decrease the amount of memory potentially available to Photoshop. Quitting applications or startup items you are not using makes more memory available to Photoshop.

To allocate more memory to Photoshop:

  1. Choose Photoshop > Preferences > Performance.
  2. In the Memory Usage section, increase the Let Photoshop Use percentage, and click OK.
  3. Restart Photoshop.
Allocating Memory with 64-bit Processors

Photoshop can directly access 3.5 GB of RAM when run on Mac OS (10.4.11 or later). If you have additional RAM on your computer, the RAM above 4 GB is used by the operating system as a cache for the Photoshop scratch disk data. Data that previously was written directly to the hard disk by Photoshop is now cached in this high RAM before being written to the hard disk by the operating system. If you are working with files large enough to take advantage of these extra 2 GB of RAM, the RAM cache can increase performance of Photoshop.

When you run Photoshop CS4 on a 64-bit operating system Photoshop can access up to 8 GB of RAM. You can see the actual amount of RAM Photoshop can use in the Let Photoshop Use number when you set the Let Photoshop Use slider in the Performance preference to 100%. The RAM above the 100% used by Photoshop, which is from approximately 3 GB to 3.7 GB, can be used directly by Photoshop plug-ins (some plug-ins need large chunks of contiguous RAM), filters, and actions. If you have more than 4 GB (to 8 GB), the RAM above 4 GB is used by the operating system as a cache for the Photoshop scratch disk data. Data that previously was written directly to the hard disk by Photoshop is now cached in this high RAM before being written to the hard disk by the operating system. If you are working with files large enough to take advantage of that extra RAM, the RAM cache can increase performance of Photoshop.

The default RAM allocation setting in Photoshop CS4 is 70%. These settings should be optimal for most users. To get the ideal RAM allocation setting for your system, change the RAM allocation in 5% increments and watch the performance of Photoshop in the Activity Monitor. You must quit and restart Photoshop after each change to see the change take effect.

The available RAM shown in the Performance preferences has already deducted an amount that is reserved for the operating system from the total RAM in your computer. You shouldn't set the percentage of RAM to be used by Photoshop to 100% (unless you are using more than 2G of RAM) because other applications which run at the same time as Photoshop (for example, Adobe Bridge CS4) need a share of the available RAM. Some applications use more RAM than you might expect. For example, web browsers can use 20-30 MB of RAM, and music players can use 20-50 MB of RAM. Watch the Activity Monitor to view the RAM allocations on your computer.

Watch your efficiency indicator while you work in Photoshop to determine the amount of RAM you'll need to keep your images in RAM. The efficiency indicator is available from the pop-up menu on the status bar of your image or from the Palette Options on the Info Palette pop-up menu. When the efficiency indicator goes much below 90%, you can increase performance by changing your RAM allocation, adding RAM, or setting your scratch disk to write to a RAID Array.

It is unlikely that Photoshop will respond well if you assign 100% of your RAM to Photoshop; this leads to Out of RAM errors. If this occurs, set the RAM allocation to 85-90%, and retest. If you still have problems, bump the RAM allocation down by 5% increments until the errors stop displaying.

Hardware

Photoshop performance is limited by the hardware you use; the faster the processor or hard disk you use, the faster Photoshop can process image information. Other hardware enhancements, such as installing additional RAM, using a multiprocessor system, or optimizing and defragmenting drives, can also improve performance.

Processor speed

The CPU (Central Processing Unit) of the Macintosh limits the speed of Photoshop. Since Photoshop manipulates large quantities of data and performs many calculations, its speed is greatly dependent on processor speed.

Photoshop requires a PowerPC G5 or an Intel-based processor. Photoshop can also take advantage of multiprocessor systems (that is, systems that have two or more PowerPC or Intel processors), which are much faster than a single-processor systems. All Photoshop features are faster on a multiprocessor system, and some features are much faster. Note that there is a law of diminishing returns with multiple processors: the more processors you use, the less you get from each addition processor. Therefore, you may not experience expected speed increases if you use more than four processors.

Installed RAM

The amount of memory Photoshop requires depends on how you use the program. If memory is insufficient, Photoshop uses hard-drive space (that is, a scratch disk) to process information. Photoshop is fastest when it can process all or most image information in memory, without having to use the scratch disk. Watch the Efficiency Indicator to determine if you are operating as efficiently as possible.

To check memory use in Photoshop, open the Efficiency Indicator: Choose Efficiency from the pop-up menu on the status bar of your image to display the percentage of time actually doing an operation instead of reading or writing the scratch disk. If the value is below 95-100%, Photoshop is using the scratch disk and, therefore, is operating more slowly. If the efficiency is less than 90%, you'll see a large performance increase by changing your RAM allocation or adding RAM.

Hard disks

As you add, delete, and move files on a hard drive, its available space is no longer a single, contiguous block. If the system does not have enough contiguous space, it saves fragments of a file to different locations on the hard drive. It takes an application longer to read a fragmented file than one saved to a contiguous location. You can defragment files and optimize available hard drive space by using a disk utility.

If, however you use a disk or RAID array only for Photoshop scratch disk files, fragmentation is rarely a concern, as hard disks used in this way don't become significantly fragmented. Fragmentation is much more likely to be an issue if you use a single disk for everything or if you have permanent files and the Photoshop scratch disk sharing a volume, especially if there's not a lot of free space. In this case, defragmenting the disk can make a significant difference.

Since Photoshop reads and writes image information while editing an image, the faster the access speed of the drive containing the image or the Photoshop scratch disk, the faster Photoshop can process image information. To improve Photoshop performance, work on files saved on drives with fast access speeds, such as an internal hard drive, rather than those with slow access speeds (a network drive) or removable media (for example, jump or flash drives). Removable media often have slower access times and are more easily damaged than internal hard drives.


P/S: Please share some of your tips and tricks here as well.

No comments:

Post a Comment