[Pythonmac-SIG] Carbon events

Jack Jansen jack@oratrix.nl
Tue, 14 Aug 2001 14:58:38 +0200


> Jack,
> 
> 	I'm not saying your incorrect, but....
> 
> 	What proof do you have that the Low Level IO/WNE routines are the
> culprit?

Pure guesswork:-)

But: educated guesswork, see my reply to Just's post just now.

> 	May I make a slightly different suggestion?
> 
> 	Instead of assuming (but probably a correct assumption), how about
> 	"we" generate a profile of MacPython?  Take the top 5 CPU cycle
> wasting
> 	routines, and optimize them.  See what affect that has, and then 
> 	take the next 5, etc.

I've done this at some point in the past, and if anyone wants to try it again 
it's real easy: just enable to "profile" option in CodeWarrior and add the 
profiler libraries to PythonCore. The source has the right calls already, 
nicely ifdeffed on __profiler or whatever.

The bad news is that profiler results are inconclusive in the light of WNE 
calls. MetroWerks themselves couldn't tell me whether the times returned were 
"process times" (i.e. time spent in WNE isn't counted) or realtime (time spent 
in WNE is counted). It may be that WNE time is counted unless you switch out 
to some other process:-(

I haven't tried all this on OSX, but I'm not even sure the MW profiler will 
work on OSX.

--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm