I wrote tcl script as an glue between different apps which are computationally intensive.
When I run top command I see that 2 cpu’s are 100% utilized.
The one is for the tcl and the second is for the application I am running.
The question is: why the tcl is utilizing fully one of the processors when the binary application is heavily computationally?
Thx.
If I were guessing I’d say the TCL script is polling something; returned messages perhaps? The ‘right’ way is to use interrupts, but that’s always a fun TCL exercise. On the other hand there’s a possibility the TCL isn’t the problem at all – if you can get at the TCL source, put “after 1000000” or the like after the tool call; then you’ll know if it’s really the TCL you have, or something else masked by the DLL.
If there’s no good way to edit the vendor TCL then perhaps you can use TCL on a ‘slow’ remote machine, and call the application itself on the ‘fast’ machine using SSH or telnet.