1
votes

Background

  • Core Data app on Snow Leopard 10.6.4 with GC

  • I've got an NSOutlineView backed by NSTreeController using bindings

  • I'm creating tens of objects on a background NSOperation subclass, saving and using mergeChangesFromContextDidSaveNotification to merge into the main context, all as recommended in the Apple docs

  • The main context has thousands of objects

The Problem

I've had lots of performance problems. Sometimes a merge can take a few seconds which locks up my UI. It also seems to use rather a lot of memory.

I recently found that others have had this issue too. I'm starting to think this is a restriction of the NSTreeController/NSOutlineView combination with bindings.

Questions

  1. Can NSOutlineView and NSTreeController handle thousands of objects efficiently?

  2. This post seemed to imply that this was an issue on 10.6.2 quoting rdar://7139579. Does anyone know if this has been "fixed"?

I'd greatly appreciate any suggestions.

1

1 Answers

0
votes

Bottom line? I think I need to optimise my app in the usual way. Also, there were lots of KVO notifications being fired off so maybe showing less data is the way to go. When I've sped up my app, I may report back here further.

Update: September 2011

I've learned so much since this question was posted. One of my big lessons has been that sometimes, you've got to let go of what you want and accept that it'll be a design trade off.

I'm currently redesigning the look of my app to make it faster. NSTreeController, I've learned, is only designed to handle a few hundred entries at most. Thousands of entries means that the user is just going to be confused anyway. I've redesigned my UI to be much simpler. And now I'm using a table view instead, which is much faster.