Skip to main content
Participant
December 14, 2010
Question

Don't record History

  • December 14, 2010
  • 1 reply
  • 2302 views

Hello,

I'm not sure if this will actually help but is there a way to prevent the recording of history states?  I find that my script runs increasingly slower over time.  Basically I have a template group of text items that I duplicate and fill in data for.  The more duplicate items there are the slower the script runs.  I have 4GB of memory available and so I don't see why it would be an issue of RAM.  I have noticed in the past however that PS runs much more slowly if i have made many changes to a large file (even if I have saved).  I have to clear the history before it starts humming again.  That is why I'm guessing the script is slowing down so much...there is a lot of history being backed up.

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
December 14, 2010

One can suspend History, but I’m not sure it has any bearing on performance.

app.activeDocument.suspendHistory("something", "main()");

function main () {

};

What version of Photoshop?

And quite frankly 4GB of RAM is not that much.

Participant
December 14, 2010

Yeah...I tried that; it doesn't really help.  I wonder...when I duplicate the layers I assign that layer to an array element so I can access it later.  Do you think it might be copying the entire contents of the layer or does it simply assign a pointer?

c.pfaffenbichler
Community Expert
Community Expert
December 14, 2010

You mean like

theArray.push(app.activeDocument.activeLayer)?

That does not copy the pixel-info.