6 Replies Latest reply on Dec 14, 2010 12:44 PM by Harbs.

    doScript CS5 Indesign verdict?

    pkrk

      I've read through some posts about using the doScript to make a script go faster.

      I've also read all the warnings.

      I'm confused as to what I should be using.

       

      FAST_ENTIRE_SCRIPT  DOES MY SCRIPT OIN 9.8 SECONDS....BUT I HAVE A LOT OF TRY CATCH'S AND  I'VE READ THE 2 DON'T PLAY WELL TOGETHER(?)

       

      ENTIRE_SCRIPT ALSO WORKS BUT ACTUALLY EXECUTES THE SCRIPT SLOWER(19.080) THAN JUST CALLING MAIN (11.400).

       

      Has CS5 corrected the issues that were of concern in previous versions?

       

      thank you

        • 1. Re: doScript CS5 Indesign verdict?
          Harbs. Level 6

          Correct. You don't want to use FAST_UNDO if you have try/catches in your script.

           

          This is not a bug. The reason FAST_UNDO is faster is that it does less checking. Not using try/catch is a concession to that fact...

           

          Harbs

          • 2. Re: doScript CS5 Indesign verdict?
            PeterPow Level 1

            Do this UndoModes work also on indesign server? I tried to use them, but in case of "FAST_ENTIRE_SCRIPT" my script was not executed at all. Other modes had no effect on speed (so it seems to me). So what would you say is the best constant to use, or is "null" the best option if I do not want to use undo?

             

            Is it right that try-catch-blocks slow down script execution speed? What time are we talking about here, because I use try-catch very often in my scripts...

             

            Are there another tips you can give for improving script run time?

            • 3. Re: doScript CS5 Indesign verdict?
              pkrk Level 1

              Thanks Harbs. So I guess unless I really want to the script to be undone in one undo i might as well live without it if i want to keep my try/catches.

               

              Peter- the only other thing I can think of at the moment is turning off redraw but I don't believe that is an issue when Indesign server is involved.

              I believe JONGWARE stated that somewhere on this forum.

              • 4. Re: doScript CS5 Indesign verdict?
                [Jongware] Most Valuable Participant

                Aww -- "stated", no, 'twas more of an educated guess. ID Server has no UI at all, so there is nothing to Not Draw.

                • 5. Re: doScript CS5 Indesign verdict?
                  Harbs. Level 6

                  Actually enableRedraw might have an effect even on the Server version because it affects when recomposition takes place. I have never done any testing on this, so I'm also guessing.

                   

                  Dirk or someone else who does more Server work might know better...

                   

                  Harbs

                  • 6. Re: doScript CS5 Indesign verdict?
                    Harbs. Level 6

                    try/catches only slow down scripts if there's an error that's caught.

                     

                    And yes, performance is another reason why it's good to avoid try/catch if you can...

                     

                    Harbs