JSFL commands: Importing hundreds of elements takes a long time and freezes the application.
When I try to import elements using a script I wrote, it takes a very long time. The first few elements take less than a second, but once the count reaches around 100 (I don't have an exact number), the import time increases to 2–5 seconds per element.
The problem is that Adobe Animate takes 5–10 minutes to run the script. If I delete this line, the script only takes about 5 seconds. Importing 10 elements takes just 10 seconds.
However, when importing hundreds of elements (e.g., 200), the import time increases with each element, and Adobe Animate becomes increasingly slow. At some point, if you click anywhere in Animate, the application crashes (on Windows 11 Pro).
I've tried several workarounds: importing in batches of 10 or 20 elements, cleaning the memory after each batch... but when the number of symbols is large, the app still crashes and stops responding.
The problem seems to be with this line:
I’ve also tried setting the layer, creating new layers, etc., but nothing seems to work.
Documentation:
https://help.adobe.com/en_US/flash/cs/extend/index.html
Can you help me?
