Re: Editor performance on Mac OS X

Ryan Dary wrote:
Hello. I'm testing the software's performance on my Macbook 2.4 Ghz loaded with Mac OS X Leopard, and compiled with REALbasic 2008r4.

The performance of the editing seems too slow for real-world use. It is the basic slowness of time-to-update after I press a key. I feel like I can type as fast as I want, but the the updating is slow, and actually makes it difficult to type.

It would be nice to have greater performance so the editing was more comfortable.

My low end test machine is a 1.33 ghz iBook G4 and it has no
problems handling the FTC. I see no evidence of the slow down of
which you speak.

FYI, key strokes and and screen updates are completely decoupled.
Updates occur at specified intervals if an update has been
requested. Currently updates to the screen occur every 111
milliseconds (if needed) while you are typing. You can go in play
with the FTUpdateTimer.UPDATE_TIME constant and try different
settings. Maybe try 55 and see what happens. Please report back to
me if this makes a difference to you.

I'm not sure how the internals are setup, but if you have your blinking cursor timer going, you should timer.reset it on each key press, and you should force the cursor/carrot to be visible on each key press. That would be a more standard approach.

I will go in the keydown code and put in a call to make sure the
caret is set to visible after each key stroke in the next beta. I
don't think this make a big difference, but we will try it and see
what happens. So look for it on the next beta and tell me if it
makes a difference.

Also, you appear to be updating far too much screen on each key stroke. I could understand if the current line, and possibly the lines below the current line needed to be refreshed (in the case of a word being pushed over the edge,) but the whole control doesn't need to be updated. And, just to make the cursor blink, it seems the only required update is the line at most, and possibly the tiny rectangle of the cursor alone.

Do you think this could be where some of the performance could be gained?

I feel like "selection" is great speed, but the typing is a bit too uncomfortable for me.

The FTC has been highly optimized. I have looked at all aspects of
the system and performed a LOT of benchmarking. I have already
considered everything you mentioned in the past. Updating the
screen is not that critical in terms of performance. The most
critical aspect is composing speed and that outweighs update speed
by an order of magnitude. While it would be faster to only update
only the part of the screen that has changed, it falls below the
threshold of human perception. In other words, you wouldn't notice
the speed up because your brain can't pick it up. In the future I
will address this from the point of view that it use less CPU
cycles while idling.

FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in 
the subject field.



Other related posts: