Re: nsarraycontroller, bindings and big databases
Re: nsarraycontroller, bindings and big databases
- Subject: Re: nsarraycontroller, bindings and big databases
- From: "Joris Mans" <email@hidden>
- Date: Wed, 15 Feb 2006 12:40:31 +0100
What do you mean by "firing faults"? (I am no expert on core data because i
cannot use it for reasons cited below).
I think you didnt understand the question completely.
The amount of data in my tables is just too big to load in memory at once
and I cannot use core data because i am interfacing with a PostgreSQL
database on a server. Just think of the database containing too much data to
fit in a reasonable amount of memory. How can we handle this problem with
bindings?
Joris
----- Original Message -----
From: "Aurélien Hugelé" <email@hidden>
To: "Joris Mans" <email@hidden>
Sent: Wednesday, February 15, 2006 10:24 AM
Subject: Re: nsarraycontroller, bindings and big databases
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