1 Reply Latest reply on Nov 29, 2016 11:25 AM by williamadowling

    Any possibilities to measure time of a display refresh for performance reasons?

    AndyWizz Level 1

      Hi there!
      Is there any JS scripting possibility to measure and report the time of a display refresh or a typical Illustrator operation like zooming in and out?

      I want to figure out which hardware and settings perform best on the same files.

        • 1. Re: Any possibilities to measure time of a display refresh for performance reasons?
          williamadowling Level 4

          To my knowledge (which is admittedly much narrower than many around here) this cannot be done. JS hijacks control of the application until the script finishes executing. So you can't be running a JS script and interacting with the UI at the same time. Ergo, you can't simultaneously measure time with JS and perform UI manipulation like zooming.


          One way around the limitation of JS hijacking the UI is to use a script palette and everyone's favorite... BridgeTalk. However, the way i understand it, the script isn't being executed while the palette is open, it's just in standby and you need to execute a function via some kind of event (like onClick()). I don't believe you could set an event to fire when you zoom in or out, which means you'd have to click some kind of "start timer" button before zooming and an "end timer" button when finished. I'm sure that you're intending to measure milliseconds, so the requirement of clicking start and stop would automatically invalidate your results.


          If someone else has a more informed answer to this I know i'd love to hear it. Hopefully i wasn't completely off base here. I'm mostly speculating based on my limited experience.