[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView -reloadData is slow

From: Richard Frith-Macdonald
Subject: Re: NSTableView -reloadData is slow
Date: Sat, 6 Apr 2002 08:31:45 +0100

On Saturday, April 6, 2002, at 08:05 AM, Jonathan B. Leffert wrote:

When I change a NSTableView's data source and call -reloadData on the table view, it seems to take a second or two to actually reload the data. It's a
very noticible delay.

Is there some timer firing in the background checking all views that are
marked as dirty and redrawing them?  If so, what is the timer period?

I'm on a fairly fast machine, so I don't think that's the problem.  I've
also timed the rest of my code and it is all completing quickly. The table
view just takes a while to update.

AFAIK there is no timer to perform updates, they are just done when an event is received (the MacOS-X documentation/spec says this is done for each pass though the event loop) ... so if there are no events, I guess the view doesn't get redrawn.

Under normal conditions, the window updating is the last thing done in the event loop - so there is no code being called to mark a view as needing update until the
next event triggers some action anyway.  This is why no timer is needed.

It may be that you have managed to find some way in which you can call -reloadData after the updating of windows has been done ... but that's just a guess. I can't think of any way to check it other than inserting debug logging statements into the gui code and trying to see what happens - stepping through under gdb wouldn't help
as it would mess up the timing, changing conditions too much.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]