Laggy live scrolling in Cocoa.
Laggy live scrolling in Cocoa.
- Subject: Laggy live scrolling in Cocoa.
- From: Henk Kampman <email@hidden>
- Date: Tue, 20 Nov 2001 00:12:00 +0100
Did anyone notice the laggy live scrolling in Cocoa apps? (Mail,Project
Builder etc)
My Cocoa application uses a table (NSTableView) that displays a static list
of text.
Even with such a simple list Cocoa does not seem to be able to keep up with
live scrolling.
After some profiling I found that text drawing is extremely slow on MacOSX,
a string of 4 characters took almost 0.5ms on a G4/400!
To be sure I replaced the cell contents with an image with exactly the same
representation as the original text.
Guess what, scrolling was fast again.
My guess is that coregraphics does not have a fontcache, in other words
every glyph has to be rendered over and over again.
Whatever the cause, this is a serious problem that needs to be fixed.
Henk Kampman