Save Big Files 20X Faster With the DisallowFlateCompressedPSD Plugin
Saving Photoshop files of size 1GB on up has long been a productivity-killing exercise, with really big files taking many minutes to save, because Photoshop has always insisted on doing single-threaded image compression when saving files.
So it didn’t matter if you had a fast RAID capable of 1000 MB/sec— the Save ran at the speed at which one CPU core could compress the image— perhaps 80MB/sec or so on a fast machine.
Single-layer PSD or PSB files are NOT compressed, and so single-layer files save quickly in any case.
NOTE: the DisallowFlateCompressedPSD has no effect on 8-bit images (confirmed by Adobe) only 16-bit images.
Workarounds existed for files up to 4GB, by saving as uncompressed TIF, but when files exceeded that size, the PSB format becomes mandatory, and suddenly file saves would take 5 minutes or longer, making saving one’s work a productivity-killing exercise.
Adobe listened and responded
I shared my concerns on this productivity issue with Adobe over the past year, and I want to applaud certain individuals on the Photoshop team (you know who you are) for making the effort to address the performance issue. Thank you.
On Friday May 6, 2011, the DisallowFlateCompressedPSD.plugin* was released. It makes an enormous difference, see the graphs below for my findings.
* “Flate” is the type of compression used when saving
Downside — larger file sizes
The downside of disabling compression is larger file sizes, but so what?
Disk space is cheap these days, but time is a fixed quantity, so any tool that lets me use my time more efficiently is a huge win. Files can always be re-saved later with compression enabled, and this can even be batch-automated by a script.
Shown below is a typical working file — I don’t even keep these files when done, so compressing them is a pure waste of my time yielding exactly zero benefit to me. There is a file-size savings of 37% with compression here.
It would be better to have this functionality as a preference and a checkbox in the save dialog. Adobe is aware of this (I already suggested it some time ago, and they agree), but this is a more invasive change. Perhaps a future version will incorporate the feature directly into the program in those ways.
Fast saves of PSD/PSB
The PSB format is now much faster and more efficient than without the plugin.
How much a difference it makes will depend on disk speed, but even users of a single fast hard drive or SSD will see a big improvement.
When testing your own system, pay attention to the following:
- Watch Activity Monitor for Page outs. If the system is paging, then Page outs increases will increase steadily— a sure performance killer.
- Watch Activity Monitor disk speed. If it shows writes and reads while saving, then something is configured (somehow) to slow you down. A slow drive will also hamper performance.
- Make sure Photoshop is configured optimally, such as the Cache Tile Size and Memory usage to 70%, unless testing proves that more than 70% is faster.
- Verify that the file size with/without the plugin is substantially different; if not, you’re obviously not testing anything.
Mac Pro results — 3 drive SSD stripe
This test used a 3-drive striped 3G SSD RAID capable of about 350 MB/sec when written with hard-to-compress data.
Mac Pro results — 4 hard drive stripe
Raising the drive speed with a 4-drive RAID-0 stripe of Hitachi 3TB 7K3000 hard drives (capable of nearly 600MB/sec), we see nearly 20X performance improvement.
MacBook Pro results
This test used the standard Apple 128GB SSD as shipped by Apple in the 2011 2.3GHz 17" MacBook Pro.
The Apple drive has notably lower performance than the OWC Mercury Extreme Pro 6G SSD, but even so, the gains are impressive. Faster drives provide further reductions in save-time.