mrx@dhw68k.cts.com (Mark Murphy) (12/13/90)
I have noticed something very wrong with Lock Screen and Unlock Screen. It seems to me that they have gotten slower! I have the following script: global x,y,z lock screen put line 1 of x into fld id 90 put line 2 of y into fld id 91 put line 3 of z into fld id 92 unlock screen Now... it takes this script about 78 ticks to execute on a MacIIcx with 256 colors. In other words, to update three fields on the screen, it takes a little over a second. If I remove the lock and unlock screen commands, the script only takes 18 ticks. Wow! What a difference! Looks like 30 ticks for each lock and unlock. I use the lock and unlock so the screen gets updated all at once... so the user does not see the three fields get updated one at a time. Yet it seems like there is quite a performance hit using lock and unlock. I don't seem to remember lock and unlock taking soooooo long in previous versions of HC. Oh.... did I forget to mention I am using HC 2.0? One other thing I have noticed... selecting text in a field via script takes a long time! Something like 'select text of fld id 90' takes quite some time. It is not the quick response I need to make the stack flow smoothly. -- mark mrx@dhw68k.cts.com
gandalf@apple.com (Martin Gannholm) (12/14/90)
In article <1990Dec12.225940.6563@dhw68k.cts.com> mrx@dhw68k.cts.com (Mark Murphy) writes: > I have noticed something very wrong with Lock Screen and Unlock Screen. > It seems to me that they have gotten slower! I have the following script: > ...>>>script deleted<<<... > Now... it takes this script about 78 ticks to execute on a MacIIcx with 256 > colors. In other words, to update three fields on the screen, it takes a > little over a second. If I remove the lock and unlock screen commands, the > script only takes 18 ticks. Wow! What a difference! Looks like 30 ticks > for each lock and unlock. The lock doesn't take any time; it's the unlock. Since we don't know what things you've changed since you locked the screen (indeed, we don't even know if you're on the same card!), we force a redraw of the whole card. When the screen isn't locked, we just redraw the area affected by the change. I guess we could consider trying to remember which parts of the card (or bkgnd) you changed and, if you're on the same card, only redraw stuff in that area. There is certainly room for optimizations in several parts of HC...we just didn't have time to do them. Martin Gannholm HyperCard 2.0 Engineer Apple Computer Exclaimer!!! I typed this myself = I speak for myself... ..or..I never said it...Nobody heard me say it...You can't prove anything!