External Method = Slow; Shell Script = Fast
Hello, I've got an external method that does some pretty complicated stuff. Basically it takes two XML files - one defines constraints, the other variables - and the script finds a solution using the variables that satisfies the constraints. At the command line (or executed via an external method that calls a shell script) execution is 2 seconds. As an external method execution is 15-20 seconds with the same input. Can anyone offer tips or strategies to improve performance? It would be obnoxious to have to encode objects for passing to a shell script. --- Edward J. Pollard, B.Sc Webmaster, University of Lethbridge Ext. 1828
----- Original Message ----- From: "Edward Pollard" <pollej@uleth.ca> To: <zope@zope.org> Sent: Wednesday, November 01, 2006 5:58 PM Subject: [Zope] External Method = Slow; Shell Script = Fast
Hello,
I've got an external method that does some pretty complicated stuff. Basically it takes two XML files - one defines constraints, the other variables - and the script finds a solution using the variables that satisfies the constraints.
At the command line (or executed via an external method that calls a shell script) execution is 2 seconds.
As an external method execution is 15-20 seconds with the same input.
Can anyone offer tips or strategies to improve performance? It would be obnoxious to have to encode objects for passing to a shell script.
You should use something like ZopeProfiler or CallProfiler to find out where the time is being spent. Jonathan
participants (2)
-
Edward Pollard -
Jonathan