Skip to main content
Participant
June 7, 2019
Question

Why is file size of smart objects unnecessarily big?

  • June 7, 2019
  • 5 replies
  • 7822 views

I have always liked non-destructive editing and smart objects can play a big part in this. One issue I have is file sizes when working with smart object layers - they are always much bigger than then they should be. My conclusion is the Photoshop .psd file stores an unnecessary rendered copy of each smart object layer.

To demonstrate the issue try this:

1. Open a file as a smart object and save.

Look at the file size, you would expect a small overhead to the size of the original file but it is about twice the size.

2. Make it a linked smart object (right click on the layer "Relink to file ..." and select the original file)

Our psd file now  contains just a link to the external original file, no actual real data that cant be derived from the original file - but it is still quite big!

3. Duplicate the linked smart object layer, save.

Twice no real data should be virtually nothing - it has grown again.

4. Now drastically shrink the image size, e.g. to 1% width and height  (Image -> Image size … ) and save.

Look at the file size - it is minute!

Try some other image sizes. You will find what ever size you set  the file size thus produced roughly tracks the image area. Hence my conclusions, the .psd file is unnecessarily storing a rendered version of each layer.

Even if it is slower to open up a file, I would very much like an option to create any rendered views needed on file opening and not storing them.

(Have I missed such an option?)

Regards,

Mark.

5 replies

JJMack
Community Expert
Community Expert
June 7, 2019

mjr1342  wrote

I have always liked non-destructive editing and smart objects can play a big part in this. One issue I have is file sizes when working with smart object layers - they are always much bigger than then they should be. My conclusion is the Photoshop .psd file stores an unnecessary rendered copy of each smart object layer.

You conclusion is simply wrong.  If Photoshop did not have pixels for an image layer.  The layer would be empty. Additionally wrong because smart object layer can share object. So many smarty object layers may be sharing the same smart object pixels.  Each smart object layer has an associated transform for it object or shared object. These transforms transform the pixels rendered for the smart objects for how the layer uses the image. The transform Scales positions and distort the object for that layer.  So a Picture package PSD my have one smart objects shared by 10 smart object layers. So the Pixels rendered for the smart object are transformed by the ten layer transform to sizes and  positions the image to the ten image locations.  Each layer has it own transform and transformed image pixels  the PSD has only one copy of the pixels rendered for the object they are required. Without Pixels the layers will have not have any pixel content they will be empty.

JJMack
Participating Frequently
July 28, 2020

No...YOUR conclusion is "simply wrong"....WHER EDO YOU THINK IT GETS THOSE PIXELS FROM IN THE FIRST PLACE?!?!?!  IT gets that information FROM THE RAW FILE!!  My god...I can't believe anybody would say something as stupid as what you just said..

Participant
April 14, 2021

I just want to add here beckause I have the exat same "issue". I have a file with just two raw layer as smart objects and have like 15 copies of them inside fodlers and masks.Now, why in hell shall you save all these pixels? I am only working with photoshop and nothin else so backward compatability and such isn't an issue, if we leave this out there is no reason to store 15 times the SAME data!

 

This is what it is, the exact same data. PS could open the project and simply restore all of the layer-data (which it probably does anyway) by loading the smart object once and transforming it using the layer transform settings. This is exactly what every 3D programm does btw. by using instancing. You can make 100 instances of a mesh, move, scew and rotate it and the filesize won't change.
Or why do you think I can just edit the smart object once while the file is open and it updates all the other objects referencing to the same?

 

Again I understand possible reasons, but I would like to have an option to disable this because it adds unnacessary filesize. Simply saving the file takes much longer but it shouldnt, that is an issue, loadup time can't be an argument here, once you make a change everything has to be updated anyway and then it is using the smart objects content, not what is stored on disc.

davescm
Community Expert
Community Expert
June 7, 2019

Photoshop does indeed store a rendered layer for each duplicated smart object. If the duplicated smart object contains 52 layers - the internals are not duplicated, the file size only increases by the rendered size.

Why do you believe that this is an issue?

Dave

c.pfaffenbichler
Community Expert
Community Expert
June 7, 2019

And if Photoshop had to place, transform and Filter all the SO-instances’ pixel content anew when opening a file that could take a while …  

mjr1342Author
Participant
June 7, 2019

Thanks for your multiple thoughts c.pfaffenbichler.

Compatibility with other applications is something I was not considering, I only use Photoshop and Lightroom (thinking about it I don't know if Lightroom needs these rendered layers).

BTW I don't normally use linked smart objects, only used that in experimenting and it demonstrates  the issue well so mentioned it above.

In the real world an example is I had an 85M pixel stitched image - 0.5GB smart object .psd to start with (16 bit RGB). I was expecting using SO duplicates would help me out, but after using 3 smart object duplicates, I ended up over the 2GB so could not even save as .psd, had to use .psb!

Thinking of changes my camera soon and may end up with ~50M pixels per image, I can easily see if I want to stick with non-destructive editing I will be looking at typically 1GB plus an edit. That will soon add up to lots of disk space seems.

For me when I use Photoshop (as opposed to quick edits in lightroom), I open a file and edit for quite a while (often hours!) so file opening time is a low priority.

I was thinking of a feature request, but thought it better to sound out on this forum first, I will await a while for other input first.

c.pfaffenbichler
Community Expert
Community Expert
June 7, 2019

Anyway, you may want to post a Feature Request over at

Photoshop Family Customer Community

As mentioned earlier I see no benefit in the approach you envision (maybe one could call it »procedural referencing«?) for Photoshop at current, but others may share your opinion and some Adobe employee/s might chime in.

c.pfaffenbichler
Community Expert
Community Expert
June 7, 2019

As an aside: One thing that can make a huge difference in certain cases is whether the SO is flattened or layered.

c.pfaffenbichler
Community Expert
Community Expert
June 7, 2019
Even if it is slower to open up a file, I would very much like an option to create any rendered views needed on file opening and not storing them.

I disagree, that every instance of the Smart Object is actually rendered looks like a necessity for some things,

• like opening in older versions (or other editors) or

• addressing Layers in layout applications like Indesign or Illustrator or

• opening an image with missing linked Smart Objects,

so it seems beneficial to me.

To me file size consideration seems negligible compared to the potential opening-time-differences.

Edit: And the calculating effort could become very high if the SO-instances are not only transformed but also have multiple Filters applied to them which would all have to be calculated anew on opening if the results were not already stored in the file.

Participant
October 10, 2020

I think this feature will quit useful as optimization the document size, it can have more benifits at transfering on network or versioning. Imagine just a slighly change like position or scale, or want to compairing with multiple background, you have to save as a huge size of document. But I don't think ‘.PSD’ can implement this, because it compatibility. Maybe the future ".PSP" can. It will make a document more like an project. BTW, like AfterEffect can add multi effects that just like filters, but it can cached or using Hardware acceleration to quick previewing it. On the use of image files, I think shouldn't be waste on packing it all if you are not sending to anyone. Is not about how much disk space that you have, but about use it in a right way and not just simply duplicated.