• 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: nsarraycontroller, bindings and big databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nsarraycontroller, bindings and big databases


  • Subject: Re: nsarraycontroller, bindings and big databases
  • From: Aurélien Hugelé <email@hidden>
  • Date: Wed, 15 Feb 2006 10:25:03 +0100

You should use Core Data for this, read the chapter about faults.
Loading thousands of objects does not mean those thousands faults will be fired. Core Data is *very* well optimized to keep memory usage as low as possible.


NSArrayController+Bindings+Core Data is very easy to use, and you'll see that fault firing is done lazily, and only on *needed* objects (ie visible is the tableview)

"Thousands" is quite small in fact. i display about 50 000 objects in 2 seconds, at the start of my app on a slow powerbook.
After these 2 seconds, everything is smooth as silk, and memory usage is kept as low as possible.


Aurelien

On 15 févr. 06, at 09:09, Joris Mans wrote:

Nobody ever encountered this problem?
Doesnt anybody use datasets bigger than the examples in the apple documentation? :D
Is the only solution to load it all in mem?



Joris

----- Original Message ----- From: "Joris Mans" <email@hidden>
To: <email@hidden>
Sent: Monday, February 13, 2006 10:21 AM
Subject: nsarraycontroller, bindings and big databases


Hi

As a new cocoa/mac/obj.C developer i m just getting used to all these new systems for me (coming from windows), but i have some questions.
I ve been using bindings (not always straightforward, but getting there :D), but now i stumbled upon some issues.
The question is:
When using an NSArrayController to show data in an NSTableView it first loads all data to show in the table in the array object in the controller, so it shows it correctly and all works well, but how do i handle the fact that my tableview should show the contents of lets say a very large database containing thousands of entries. I dont want to load them all in memory in my array at once, i want to update the array so it only loads a part of the array around the current selection of the database. How do i do this in cocoa with bindings? Do KVO on the selection of the arraycontroller and update the array manually? Any other way?


tnx

Joris
_______________________________________________
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
_______________________________________________
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
References: 
 >nsarraycontroller, bindings and big databases (From: "Joris Mans" <email@hidden>)
 >Re: nsarraycontroller, bindings and big databases (From: "Joris Mans" <email@hidden>)

  • Prev by Date: Re: nsarraycontroller, bindings and big databases
  • Next by Date: Re: CoreImage: Newbie can't find memory leak
  • Previous by thread: Re: nsarraycontroller, bindings and big databases
  • Next by thread: Re: nsarraycontroller, bindings and big databases
  • Index(es):
    • Date
    • Thread