English 中文(简体)
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 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.

问题回答

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?





相关问题
What does it mean "to write a web service"?

I just asked a question about whether it was possible to write a web-page-checking code and run it from free web server, and one supporter answered and said that it was possible only if I run "a web ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Why does Scala create a ~/tmp directory when I run a script?

When I execute a Scala script from the command line, a directory named "tmp" is created in my home directory. It is always empty, so I simply deleted it without any apparent problem. Of course, when I ...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签