View Full Version : client side grid pagination
kelvin
23 Jul 2007, 1:05 AM
I would like to ask is it possible to implement client side grid pagination?
that is, I got millions of records in memory, In order to reduce browser memory consumption and to trim and streamline the layout, an client side grid pagination feature is desired.
However, in my understanding, it seems that Ext only support server side grid pagination with JsonReader. could any experts here give me some hints to make the client side grid pagination work?
Thanks in advance
jay@moduscreate.com
23 Jul 2007, 3:24 AM
to load millions of records into memory for javascript would be rediculously slow. Serverside pagination is the best solution. Javascript is not the most efficient interpreted language and even paging between thousands of rows can slow things down. I would hit severe slow downs when paging through > 5000 rows in memory. I was able to get pagination to work with cached records but it got to be unbearably slow.
Hell, any compiled application would not let you load Millions of rows of data simply because it makes no sense to do so. The resources required is pretty tremendous.
BernardChhun
23 Jul 2007, 3:39 AM
gotta agree with our Ext DJ here,
even if you have client side pagination, those 5000 rows would still be in your browser's memory...in short, don't do it :-|
prabugenius
10 Sep 2007, 1:15 AM
Hi all,
I want to do the client side pagination. My data set is not so large and I dont want to do server side pagination as it increases the burden of my db server.
Can anyone please suggest how to enable the client side pagination?
Thanks
Animal
10 Sep 2007, 1:19 AM
That's just crazy!
That's what server-side pagination was designed for!
It's a ridiculous load on both your server and your client to get all the rows from the database, and render them all!
Most database drivers are intelligent about what they actually read from the server.
Your SQL query may potentially be thousands of rows, but the software should only actually return to you the rows you access.
User server-side pagination!
prabugenius
12 Sep 2007, 3:55 AM
Animal:
Point Taken.
But Can you please provide me the way i should send my JSON string for the next page request.
I am doing Json formation in PHP and echo ing it. It does not work.
It'll be really helpful if you show me some example script.
Thanks...
Animal
12 Sep 2007, 4:08 AM
What gives you the idea that I know PHP?
prabugenius
12 Sep 2007, 4:20 AM
I really dont have any idea about that. :)
I could see the php script locations in the examples provided in the ext docs.
(Like the example script http://extjs.com/forum/topics-remote.php which is called from ext1.1/examples/grid/paging.js)
It'll be really helpful if I get this above script (topics-remote.php).
Please give the link If I can get this somewhere in the website.
Thanks in advance.
Ronaldo
12 Sep 2007, 4:25 AM
The examples are all in the Learn/API section. Then, the examples are located in the bottom of the list.
You can use firebug to view any javascript/example there if there's no link to it.
prabugenius
13 Sep 2007, 3:46 AM
Thanks for the help folks.
Points his finger towards Ext.ux.data.PagingMemoryProxy (http://extjs.com/forum/showthread.php?t=11652) this does exactly what you want.
This topic has very often been discussed on the Forums and IRC, I wrote that extension not so that people can put 20k of records in the browsers memory and like sayed above in almost all cases you should use server side paging.
Animal right when he says that this shouldn't at all be a burdon at all even with a decent amount of concurrent users on a decent server platform. Java/J2EE and Python/Django are the onces i know of that have extensive database capabilities and drivers to support query and result set caching or other forms of smart programming tricks that brings the database and server loads down to a bare minimum. I'm not sure about things like php / rails and/or asp but my guess is they'll not lag much behind Java solutions.
So if you're really one of these corner cases where the combination of a clientside dataset and paging is desirable take a look at the UX, otherwise server side paging/filtering and sorting is the prefered way :)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.