Some background: In my Rails environment I'm using CoffeeScript which uses ExecJS which uses the Windows Scripting Host to execute Javascript files.
Unfortunately I'm experiencing huge delays (> 30 seconds) when my CoffeeScript files are compiled.
Using Process Explorer and Process Monitor I already identified the command line as one of the causes. cscript.exe
expects its parameters with double slashes:
cscript //E:jscript //Nologo //U C:/path_to_coffeescript_compiler.js
For some reason cmd.exe
(not cscript.exe
!) treats the double slashes as double backslashes and tries to resolve the network name of each parameter which obviously fails, but not after some delay.
Here's a small excerpt of the Process Monitor log:
cmd.exe CreateFile \\E:jscript\\ OBJECT PATH INVALID
cmd.exe CreateFile \\E:jscript \Nologo\\ BAD NETWORK PATH
cmd.exe CreateFile \\E:jscript \Nologo \U\ BAD NETWORK PATH
cmd.exe CreateFile \\Nologo\\ OBJECT PATH INVALID
cmd.exe CreateFile \\Nologo \U\ BAD NETWORK PATH
... and so on.
What can I do to prevent this?