Vitaly Polyakov
My feedback
4 results found
-
17 votesVitaly Polyakov supported this idea ·
-
14 votes
An error occurred while saving the comment Vitaly Polyakov supported this idea · -
9 votesVitaly Polyakov supported this idea ·
-
12 votesVitaly Polyakov supported this idea ·
I have such a problem. I checked Illustrator versions 16.2.0, 26.4.1, 27.0 - the problem is reproduced.
For example generate a file with a lot of objects using generate_rectangles.jsx
Then run test_collection.jsx
I got the following results:
Access time to pageItems[0] - 0.002 sec
Access time to pageItems[100000] - 0.02 sec
generate_rectangles.jsx
------------
var count = 100001;
for (var i = 0; i < count; i++) {
app.activeDocument.pathItems.rectangle(0,0,100,100);
if (i % 100 == 0)
$.writeln(i);
}
------------
test_collection.jsx
------------
var pi = activeDocument.pageItems;
for (var i = 0, len = pi.length; i < len; i+=100) {
$.hiresTimer
pi[i].name = i;
if (i % 100 == 0){
var time = $.hiresTimer/1000000;
$.writeln(i+": " + time.toFixed(4) + " seconds")
}
}