Accessing to properties of layer.textitem is getting slower as a number of textlayer is increasing
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 Unfortunately, no good ideas. It has also never been tested for performance testing between this API and machine performance or software versions.
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!
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.