KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it only me that thinks the CS5 scripts runs painfully slow? These few lines takes over 1 minute to execute. for (n=0; n<app.activeDocument.layerSets.length; n++) { app.activeDocument.layerSets[n].visible = false; } The number of layerSets are 20. I'm running the CS5.1 64bit version on a Vista Home Premium system, AMD Athlon 64 X2 Dual Core 5200+ with 8GB RAM. I tried to Export the script as a .JSXBIN but it still takes over 1 minute. CPU usage for CS5.1 goes from 3% to 57% when the CS5.1 is running the .JSXBIN script. There must be something wrong here, how can I speed up the scripts? // Thanks * EDIT * It seems like CS5's own DOM implementation is the problem here. The script speeded up more than twice by reading DOM related values into local variables. var LayerCount = app.activeDocument.layerSets.length; var LayerRoot = app.activeDocument.layerSets; for (n=0; n<LayerCount; n++) { LayerRoot[n].visible = false; } ...but still, it far to much time to just change a property in 20 objects. Any help with optimizing would be appreciated :)
Tags (comma-separated)
Save Edits
Cancel