PDA

View Full Version : What is the maximum size of the Ext.Store



NaveenMinchu
11 Feb 2010, 10:25 AM
Hi,

What is the maximum size of the Ext.Store.

What I meant was number of the records the Ext.Store can hold.

Regards

11 Feb 2010, 10:39 AM
as much as the browser can store?

It's just JavaScript, not magic.

mystix
11 Feb 2010, 10:49 AM
ideally, though, i wouldn't think of storing more than 1k records in there (even a hundred is pushing it, but that's just me).

imagine how much hair you would lose if your pet hamster managed to chew through the adapter cable connecting your battery-less laptop to the mains...

11 Feb 2010, 10:50 AM
the problem always, IMHO is DOM manipulation. :-\

mystix
11 Feb 2010, 10:53 AM
if it's being used just as a data cache (i.e. no rendering, just records), the browser will take it in its stride (iirc, you did an actual test on this before, nay?).

if you're rendering more than a hundred records, however, don't surprised if your laptop starts spewing hot liquified metal.
(@dougcrockford mentioned this last year in his keynote at the Ext conf, no?)

Mike Robinson
12 Feb 2010, 7:35 AM
To my way of thinking (and designing), the Store is simply a "smart client-side cache." It holds a slice of the total records in the host-side data source... i.e. the ones that the user is looking-at or manipulating at the time.

Its other responsibility (if a Writer object is attached) is to transparently provide CRUD (Create/Read/Update/Destroy) services. "You do what you want to with my records, and I'll tell the host." "You tell me what records you require, and I'll go get them and make them available to you, and I'll tell you when I've got them."

The capacity of a Store object really should not be something that you try to "design for," and I offer two reasons. First, "yes, memory capacity on the client side is of unknown size." But second, "don't 'heat up The Wire' more than you actually have to." It takes a finite and sometimes significant amount of time and bandwidth to transfer those records.

Google might tell you that it has found "about 5,300,202 records" 8-| (good marketing... it actually makes available no more than a few hundred, max... and a third of those are in Swahili...) but it only sends you a list of twenty. If you then ask for "Page x" of those supposedly bezillions of records, it sends that page. And so, what needs to be cached on the client side? "Page x."