Forum Discussion

ryan_perneel's avatar
ryan_perneel
Contributor
6 years ago

Converted JScript to Javascript project stalling on Log.Message calls

Hey, 

 

I have a legacy project in JScript that I am converting to Javascript, and i am hitting what seems to be an odd issues.  If I watch the execution of my scripts, the scripts are stalling when ever there is a Log.Message call.  It is not every log.message, but more often than not, it is stuck.

 

Has anyone run into this?

 

I have a non-converted project running in javascript and am NOT seeing the slow downs when logging.

 

Thanks.

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Stuck meaning it takes longer to run than the other log messages or stuck in that it never moves on?

     

    What exactly are those particular log messages recording?  Post them here please.

    • ryan_perneel's avatar
      ryan_perneel
      Contributor

      sorry, the execution stalls.  it is not always Log.Message.  there are some .click calls that are slow as well.

       

      the main one that stalls every time is this;

       

      var xmlDoc = Sys.OleObject("Msxml2.DOMDocument.6.0");
      xmlDoc.async = false;

      let path = ProjectSuite.Path + "OMITTED" + sXMLFile + "\\" + sXMLFile + ".xml"

      Log.Message(path); <----this line

       

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Is sXMLFile a string?  If not, that could be a problem.

         

        Some other things to try to narrow down the issue:

         

        1) Hard code the whole path and put it inside the Log.Message and see if it works without slowing down

        2) See if Log.Message(ProjectSuite.Path + "OMITTED" + sXMLFile + "\\" + sXMLFile + ".xml") works without slowing down