Skip to main content
Participating Frequently
August 9, 2024

Why is Photoshop still single-threaded for open and save operations? There is no excuse for this.

  • August 9, 2024
  • 7 replies
  • 851 views

This more a negligence complaint than a bug report.

 

The Problem:

In compressed files (PSB, or TIF and PSD with any compression options turned on) the bottleneck when opening and saving a file is your processor's single-threaded performance. You will never get anywhere near the throughput of even a slow hard drive from 10 years ago.

 

I've read lore that there are computer science reasons that this kind of compression can't be multithreaded. But I doubt it's true. For one, a friend who's a developer and imaging engineer doesn't believe it. For another, I've run tests that show Photoshop can't even save two entirely separate files simultaneously. If you have multiple images open and hit save one after the other, they will still save one-at-a-time. We know this can be multithreaded. Adobe's own lightroom will make each image its own thread and distribute to all the processor cores available when importing or exporting. 

 

Evidence:

I made multiple copies of a 1GB image. This was from a 36MP camera, and had several image layers, adjustment layers, and channels. 

 

I tested on a Mac Studio with M2 Max processor, 64GB ram. I repeated the test with the internal 2TB drive (which tests to over 6GB/S throughput with large files, and an external 8TB drive (Micron enterprise u.2 nvme drive in a thunderbolt enclosure; tests to over 3TB/S throughput with large files). 

 

I also made edits to each file and saved them all simultaneously. I watched activity monitor to see thread activity and throughput.

 

For some reason the external drive saved the files faster than the internal, despite my benchmarks, so those are the Save results I'm reporting:

AmorphousDiskmark 1 1GB: 3020 MB/s

No compression:   388 MB/s 

TIF; LZW / RLE:     51.7 MB/s

TIF; ZIP / ZIP:        3.16 MB/s

 

In summary:

  • With no compression we get just better than an order of magnitude slower than the drive's maximum speed; 
  • With LZW we get a little better than 2 orders of magnitude slower;
  • With ZIP/Zip we get barely more than 3 orders of magnitude slower.
  • We don't even get parallelsim when saving multiple files at once. They just line up one after the other, like sad cows limping into a slaughterhouse.

 

Conclusion: Adobe, what are we paying you for every month? This isn't ok, and I don't understand why your customers let you get away with it year after year. 

Many of us do not need pervasive AI and embarassing effects. We need you to fix the broken things that have been slowing us down since the 20th century. Computers are crazy fast now—if you don't sabbotage them. 

 

 

 

 

 

 

7 replies

Participating Frequently
August 11, 2024

It's possible they've optimized properly on the Windows version and not the Mac version. Although I don't see differences showing up in benchmarks. It's clear on my own systems (Apple Silicon and Intel) that when saving PSB, PSD, or layered and compressed Tif files, the process is almost entirely single-threaded. 

 

Did you try simultaneously saving or opening multiple files?

 

 

D Fosse
Community Expert
Community Expert
August 11, 2024

Hang on. New test, this time with PSB compression on.

 

Yes, it's slow, and maybe core distribution isn't absolutely even - but you can't call this single-threaded:

 

 

D Fosse
Community Expert
Community Expert
August 11, 2024

Well, OK, but to be accurate, saving isn't single-threaded, but some of the very old compression algorithms may be.

Participating Frequently
August 11, 2024

You're just affirming everything I complained about. Compression (especially zip, which is the only effective algorithm for 16-bit files) is much too slow.

 

It's too slow because it's single-threaded. I've demonstrated this and so have many other people.

 

It's even single-threaded if you're trying to open or save multiple files simultaneously. Unlike Lightroom, which can treat the open or save operation of each image as a separate thread. There's zero excuse for this. 

D Fosse
Community Expert
Community Expert
August 10, 2024

It's layered.

 

I never use compression of any kind, I just don't have time to wait for it. It doesn't really matter for small files, that's instant anyway, but when you get into GBs, it can be, say, two minutes instead of ten seconds.

 

Standard compression algorithms are mostly old and outdated. LZW doesn't even work properly on 16 bit data and will actually increase file size. If it could be improved I wouldn't mind that. For a while there was RLE compression on PSD files, which seemed like a reasonable compromise. It shrank file sizes about 20-30%, and took about 20-30% longer save times.

 

The problem was that it was applied by default even when you had all compression set to off, so there were a lot of complaints about that and they removed it.

Participating Frequently
August 10, 2024

Is that a layered file with compression?

D Fosse
Community Expert
Community Expert
August 10, 2024

I don't know why you say a Save is single-threaded. Here's saving a big file to the desktop:

 

Open/Save is very little about disk speed, and all about decoding/encoding. If there is compression, that's all in the CPU.