photoshop-python-api icon indicating copy to clipboard operation
photoshop-python-api copied to clipboard

Accessing to properties of layer.textitem is getting slower as a number of textlayer is increasing

Open Arous opened this issue 3 years ago • 3 comments

about 2~3 seconds to execute when a template has 200 layers, 148 Groups about 2 minutes 30 seconds to execute when a template has 3000 layers, 500 Groups

new_layer = self.doc.artLayers.add()
new_layer.move(added_layerSet, ps.ElementPlacement.PlaceInside)
new_layer.textItem.size = font_size
new_layer.textItem.contents = contetns

Desktop (please complete the following information):

  • OS: [Windows10,]
  • Photoshop Version: [Photoshop CC 2018]
  • Python Version: [python-3.8]

what is that and Is there any way to make this more faster?

Arous avatar Jul 25 '22 08:07 Arous

@Arous Unfortunately, no good ideas. It has also never been tested for performance testing between this API and machine performance or software versions.

loonghao avatar Jul 26 '22 17:07 loonghao

Thanks for your reply. I tried to change using AM code instead of using DOM though its performance is still slow. Anyway, thanks for this API!

Arous avatar Jul 26 '22 23:07 Arous

In my experience Photoshop performance gradually decreases the more layers are in the document, this is entirely on Photoshop's end, its a limitation of the software unfortunately not the API.

Investigamer avatar Aug 01 '22 09:08 Investigamer