3 Replies Latest reply on Sep 23, 2013 8:38 PM by DaveSofTypefi

    Why is C# code slower than Javascript code?


      I'm porting a Javscript to C#, for deployment and management issues, but I have an issue which I cannot figure out;  A same function written in C# is ten times slower compared to Javascript.

      For example, I wrote a Javascript which changes the size of every images within the current InDesign document, and it takes about 10 seconds. In C#, via InDesign classes, it takes about 2 minutes.

      I think this is because of the real-time update whenever a document is opened. Duration is nearly the same with Javascript when I set property:visible to false.

      I tried what I can, but failed. Any help would be very grateful.

      Thank you.