strange performance behavior when running app from scripting language
I wrote tcl script as an glue between different apps which are computationally intensive.
When I runtop
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 full开发者_如何学编程y 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.
More specifics would be helpful: which tools are you speaking about? For what purpose do they provide a Tcl interface? Did you create the Tcl script? How do you invoke it?
精彩评论