• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings or datasource for a large NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings or datasource for a large NSTableView


  • Subject: Re: Bindings or datasource for a large NSTableView
  • From: AurĂ©lien HugelĂ© <email@hidden>
  • Date: Fri, 27 Jan 2006 09:56:34 +0100

If you can use core data, then go for it :
ArrayController are *extremly well* optimized for core data access :

they use a sort descriptor in their fetch request(s) that match the sort descriptor of the table view.
they fire faults of *only* currently visible objects (and fire the faults on the fly when scrolling)
they have a "hidden" sort cache to help sorting using the best possible algorithm (ie use merge sort instead of qsort when adequate)
and maybe other features ?


if you have another database, then migrate it to core data ? if not possible... hmmm to bad :) try to replicated NSArrayController mechanism with core data !
good luck


On 25 janv. 06, at 23:09, Dado Colussi wrote:

Hi,

first post, quite new to Cocoa and Mac in general. I have an external SQL database sitting somewhere with potentially large tables. I should display data from the tables on an NSTableView. It should be possible to perform sorting, searching and filtring on the data. I don't know how to implement this efficiently with NSArrayController and bindings. I found a short discussion about a similar problem on this list dated a few years back. Someone suggested implementing a cache-boosted data source that makes direct queries to the database [1]. It would allow me to have the database sort the records for me as well as to let me populate the table in a lazy manner (i.e. fetch the first N rows and fetch more after a cache-miss).

I would appreaciate your comments and suggestions for alternative approaches.

Thanks!

Dado

[1] http://lists.apple.com/archives/cocoa-dev/2003/Mar/msg01680.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gumitech.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bindings or datasource for a large NSTableView
      • From: Dado Colussi <email@hidden>
References: 
 >Bindings or datasource for a large NSTableView (From: Dado Colussi <email@hidden>)

  • Prev by Date: Re: NSCursor Resize Cursor
  • Next by Date: NSTextStorage subclass
  • Previous by thread: Re: Bindings or datasource for a large NSTableView
  • Next by thread: Re: Bindings or datasource for a large NSTableView
  • Index(es):
    • Date
    • Thread