Nathanael,
Nathanael Schärli wrote:
I was aware of the fact that the old recognizer is using the pen trail, but when I implemented Genie I thought it would be cool if the Genie trail would be a real Morph and we could even use it properly on a BouncingAtomsMorph or anything else that is moving around. However, since trails are anyway only visible for a short time, performance is much more important than fancy features like correct updating on top of a BouncingAtomsMorph. If we can make it faster using a single Stroke Morph instead of multiple LineMorphs that would be cool! Otherwise, I'll probably just switch to using the trail pane (as turtles and the old recognizer do it).
(Historic note: The first pre-alpha-version of Genie was using the trail plane instead of Morphs and once more it looks as if the straight-forward and simple approach is not so bad as it looks like :)
As far as the delay in the lookup is concerned, I'm really thinking of writing a primitive for it. 90% of the time is spent in the method CRStrokeFeature>>sameClassAbsoluteStrokeDistance:forReference: that basically iterates over the vector decompositions of two gestures and compares them using integer arithmetic. (I avoided any floating point operations because that is even slower on small machines). This method has < 100 LOC and it only calls two helper methods (3 LOC each). I don't have much experience concerning the performance gain by making a primitive out of such a method, but I have a feeling that it could be quite a lot. Does anyone know more?
After taking a look onto it I guess a speedup of factor 5 to 10 for this method, if written as primitive. This is a conservative estimation.
If you or another person haven't written it so far, I'd like to help here.
Greetings,
Stephan
Nathanael
-----Original Message----- From: hmm@heeg.de [mailto:hmm@heeg.de] Sent: Thursday, March 15, 2001 2:32 PM To: squeak@cs.uiuc.edu Subject: Re: Genie on iPaq..comments
Kevin Fisher wrote:
I'm not sure what could be the cause of the drawing
slowness. It certainly
isn't system load, as I'm basically only running an
X-server and Squeak (no
window managers or anything else).
Generally Morphic is considerably slower on the iPaq, but
as I mentioned, the
CharRecog pen trail isn't laggy at all by comparison.
The difference between CharRecog and Genie is that the former writes its trail directly to the screen, while the latter contructs and modifies a Morph for the pen trail, which is of course much slower if Morphic is slow on your machine. I think it should be easy to retrofit Genie with a direct-to-screen trail. I have also noticed that the feedback is accomplished with a number of straight line morphs. Probably a stroke morph which just gets new points appended would make things a bit faster. This kind of morph might either invalidate the rectangle encompassing the added line segment for each new point, or it could draw that segment directly to screen for that special case. I will probably play with it a little bit today, maybe the outcome will be such a faster stroke morph.
Cheers, Hans-Martin
squeak-dev@lists.squeakfoundation.org