You welcome,
It really depends on your code Cero, but for example if you have a for or while loop that goes for hundreds of cycles you can break it down to smaller portions, for and loop block a thread during their execution, that mean each while/for loop is a single process request no matter how big or intense it'd be, it should be done before that CPU core/thread accepts another request, but if you break that to two cycles, thread will be freed by the first request and taken back by the second one (therebetween cpu can decide about priorities and runs some short, high priority tasks before getting to work on the second loop). again, it depends on your code and your needs but for example to break a 100 time loop into 10 x 10 ones you can do:
var arrayLength = 100;
/*Before:*/
for (var i = arrayLength - 1; i >= 0; i--) {
exportThePage(i);
};
/*After:*/
var breakPoint = 10;
var neededCycles = arrayLength / breakPoint; //obviously you need to improve these aspects since it breaks if you have 103 cycles for example!
var currentCycle = 0;
function loopBreaker(){
if(breakPoint < arrayLength && currentCycle <= neededCycles){
currentCycle++;
mainLoop(currentCycle);
} else if (breakPoint >= arrayLength) {
alert('no need for me! just call a simple loop!')
} else {
alert('Im done here!');
}
}
function mainLoop(currentCycle){
for (var i = breakPoint - 1; i >= 0; i--) {
exportThePage((breakPoint * (currentCycle - 1)) + i);
alert('just finished workin on page: '+(breakPoint * (currentCycle - 1)) + i);
}
loopBreaker();
}
Now I didn't have a chance to test this at all (I may be able to test it tomorrow at university) (Edit: unsurprisingly there were a little error which I fixed), in adition it makes it harder to do such a thing in extendScript in absence of javascript timing events but I guess it will work if your page export process is heavy enough to prevent this code to through an stack overflow error (otherwise you need to increase breakPoint variable, or use a short sleep period or you simply don't need it really), I also hope to not have a syntax error here so please re-check it yourself.
About using GC it may (or may not) solve your memory problem but most certainly wont help any on your cpu load, it's better to re-use objects and not to destroy them every time.
PS: ah I forgot to say but there is no need really to mention that you need to change and adapt above code cause it will break easily if you have 103 pages for example instead of 100, I just wanted to show one of the approaches I'd think of,
hope it helps and gl , 
m,