Question
workflow design
I'm interested in various approaches to controlling workflow with a view to conserving system resources.
Say you have a typical situation where you are going to collect a list of files in bridge and then process that list in Photoshop.
Imagine that the number of files could be quite large, 1000, even 10,000.
There are various ways of working with this. Easiest is probably (I):
1. Collect files in Bridge.
2. Send them over as myFiles.toSource() in a string and regenerate them as soon as they arrive via BridgeTalk.
3. Process targets one after the other in PS.
Given File Objects are more complex than a string, the next variation (II) would be the same only send the files as just the fullName string, and regenerate one at a time in PS for each iteration. This is pretty efficient as it is just a moderately long string being held in memory most of the time.
A quite different approach is to collect the file addresses in Bridge and send them over for processing in PS one at a time (so the for loop of myFiles is in Bridge instead of Photoshop). This is very efficient since at best Bridge need only have one file Object at a time. But it does require more two-way interaction between Bridge and PS as Bridge has to be told - 'ready for the next file' - I guess that is equivalent (but much simpler) to processes within Bob's Open-Close script which show a progress-bar in Bridge. It may be that the processes required in having Bridge running a JS and PS running one at the same time, with one waiting for the other, may end up being just as demanding as (II) where the Bridge script ends once it has sent the files over.
More generally I am interested if use of system resources is something for script writers to be concerned about (when they are not doing processing of obvious very high resource demand such as attempting to work with image pixels one at a time). On the one hand, compared to the crunching PS must do in running a complex operation, JS's seem very minor, but on the other hand when you have a big script running that has geenrated a large number of variables, there's an aweful lot of stuff there in the ESTK sometimes.
Andrew
Say you have a typical situation where you are going to collect a list of files in bridge and then process that list in Photoshop.
Imagine that the number of files could be quite large, 1000, even 10,000.
There are various ways of working with this. Easiest is probably (I):
1. Collect files in Bridge.
2. Send them over as myFiles.toSource() in a string and regenerate them as soon as they arrive via BridgeTalk.
3. Process targets one after the other in PS.
Given File Objects are more complex than a string, the next variation (II) would be the same only send the files as just the fullName string, and regenerate one at a time in PS for each iteration. This is pretty efficient as it is just a moderately long string being held in memory most of the time.
A quite different approach is to collect the file addresses in Bridge and send them over for processing in PS one at a time (so the for loop of myFiles is in Bridge instead of Photoshop). This is very efficient since at best Bridge need only have one file Object at a time. But it does require more two-way interaction between Bridge and PS as Bridge has to be told - 'ready for the next file' - I guess that is equivalent (but much simpler) to processes within Bob's Open-Close script which show a progress-bar in Bridge. It may be that the processes required in having Bridge running a JS and PS running one at the same time, with one waiting for the other, may end up being just as demanding as (II) where the Bridge script ends once it has sent the files over.
More generally I am interested if use of system resources is something for script writers to be concerned about (when they are not doing processing of obvious very high resource demand such as attempting to work with image pixels one at a time). On the one hand, compared to the crunching PS must do in running a complex operation, JS's seem very minor, but on the other hand when you have a big script running that has geenrated a large number of variables, there's an aweful lot of stuff there in the ESTK sometimes.
Andrew
