Skip to main content
jasonp49818280
Inspiring
September 22, 2022
Question

Script causing Memory Issue

  • September 22, 2022
  • 1 reply
  • 182 views

So I am running a script and its causing me to get an error that "Adobe doesnt have enough Memory" Anyway I can try and narrow down what might be causeing this? I am using Visual Studio Code, and if I run the script and one function runs it will give me the error. Oddly enough there are other functions that have the same code and they cause no issues. I know thats really vague and normally I would post the code, but its about 1800 lines. It does a lot of stuff. I went in and started turning stuff off to try and narrow it down and I have found a few things that when commented out dont bring out the issue.

This topic has been closed for replies.

1 reply

Mylenium
Legend
September 22, 2022

Yeah, you likely would really have to post the code, though not necessarily publicly. Typical things to look for are of course just creating a ton of points or objects or overflowing arrays when sorting things in like reordering layers. If you use tons of loops I'd also start by truncating them with fixed values. A complex main loop can cause the weirdest issues when AI needs to update/ draw a ton of items all at once, especially with complex appearances or object/ layer interactions. In such a case it might make more sense to restrict the amount of loops and instead run the script multiple times or structure it in such a way that there's some intermediary refresh before entering the next iteration.

 

Mylenium