views:

55

answers:

1

In my CoreData Application, I've an outline view on left of main window, acting as source list (like iTunes); on the right I display a proper view, based on outline selection. Each view has its components, such as table view, connected to array controller, owned by the specific view. Very often different views display same data, for example, a table view of the same entity.

From a performance point of view, is better to have a single array controller per entity and share it between all views or does CoreData cache avoid memory waste?

+1  A: 

Core Data is very efficient, and the array controllers are very efficient and lightweight objects. You should use as many array controllers as necessary. Array controllers maintain selections, so if each outline view can have different selections, you will absolutely need an array controller per each unique selection.

CJ
I agree, CoreData is very efficient and offers many useful features such as selection. However, as my application is getting more and more complex, startup time is growing up, mostly due to fetch objects from the store.
unixo