counting message invocations.

Alan Grimes alangrimes at starpower.net
Thu Mar 25 20:16:33 UTC 2004


What's the best way to count the number of times a given mesage is sent?

I ask this because I now strongly suspect that Form > pixelValueAt: is 
called a hell of a lot more times than people generally beleive. My 
evidence is what happened while I was debugging an improved 
implementation of said function.

At first I assumed that Form was like Array in that it went from 1 at 1 to 
foo at bar.

My first attempt at implementing a bit-grabber was based on this 
assumption. When I tried this first implementation, the image would go 
into infinite debug-box loop whenever I moved my mouse cursor over one 
of my test images. It must therefore be the case that "pixelValueAt:" is 
a well-used subsidiary of Morphic and hence it's performance directly 
impacts the user experience.

I _THINK_ I have a working non-bitBlit implementation...
If it is indeed the case that this function is used many times in normal 
usage (making it worth wile to spend time incorporating a faster 
implementation), I will present my code as my first contribution to 
mainline squeak! =)




More information about the Squeak-dev mailing list