473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Paging Logic In Javascript?

Hi.

I have writting all of my paging logic in javascript.
It works pretty fine. Basically, I have created a
gridview with full paging in javascript. Now, given
a certain need, I am being advised to do my paging
on the server.

My question: is there a performance cost by doing
all my paging server-side (and cost benefit by keeping
it on the client). Or, does it matter?

Thanks!

Apr 12 '07 #1
3 13705
On Apr 13, 4:26 am, "pbd22" <dush...@gmail.comwrote:
My question: is there a performance cost by doing
all my paging server-side (and cost benefit by keeping
it on the client). Or, does it matter?
CMIIW.
I would recommend to do your pagination logic at server-side, then
javascript to do request paging (ajax + json recommended) and some
fashion.
The page size will be reduced, and the page loads faster (especially
in web page). The server performance will be increased too, because it
generates smaller page.

Few months ago, I got complain from user accessed around 250 rows on a
single page. More than 2 minutes until the page shown on P2 CPU. The
page is in an intranet application, and it use javascript to stripe
colors, fits each column width, etc, but no ajax.
Under development process, the data just about 30 rows and I didn't
think to do any pagination.

HTH

Apr 13 '07 #2
On Apr 12, 8:01 pm, "Cah Sableng" <cahsabl...@gmail.comwrote:
I would recommend to do your pagination logic at server-side, then
javascript to do request paging (ajax + json recommended) and some
fashion.
The down-side is that those without js support will not be able to
change pages. Or if you build in a fall-back, then they are refreshing
the entire page each time, which may be annoying.

If the whole result set isn't too big, then you can dump it down as
one single long table and use script to auto-paginate it. Those
without js will see a long table, those with js will see a client-side
paging table.
Example: http://www.JavascriptToolbox.com/lib/table/
Few months ago, I got complain from user accessed around 250 rows on a
single page. More than 2 minutes until the page shown on P2 CPU.
For 250 rows? I would say something is definitely wrong...
page is in an intranet application, and it use javascript to stripe
colors, fits each column width, etc, but no ajax.
Perhaps your script was slow and the results could be much improved
for the user.

Matt Kruse

Apr 13 '07 #3
On Apr 13, 8:26 am, "Matt Kruse" <m...@mattkruse.comwrote:
On Apr 12, 8:01 pm, "Cah Sableng" <cahsabl...@gmail.comwrote:
Few months ago, I got complain from user accessed around 250 rows on a
single page. More than 2 minutes until the page shown on P2 CPU.

For 250 rows? I would say something is definitely wrong...
page is in an intranet application, and it use javascript to stripe
colors, fits each column width, etc, but no ajax.

Perhaps your script was slow and the results could be much improved
for the user.
The page is a printer-friendly script. The script is responsible to
measure the height of entire page then remove all elements. Then
divide pages into div[s] with page-break based on paper size user
entered. It was using cross-browser library to do the dirty job rather
than scripting all in self-made javascipt. Tested on user's P2 CPU,
the performace is poor. Perhaps I should make replacement of cross-
browser's functions to increse performance.
Apr 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: asad | last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom paging bcoz data is too heavy so pls tell me how can i use custom paging in ASP.NET Thanks
1
by: Jon Turner | last post by:
is there anyway to trap the client side paging event of the DataGrid in JavaScript ? If the user makes a change to a row, I want to warn them they will lose changes before they page. Many...
2
by: asad | last post by:
hello friends, how ru all I want to create a custom paging logic in ASP.NET with a next link for example if i have 100 pages record so i want to show 6 pages link on page one and next link ...
0
by: Christian Hofmann | last post by:
Hello, I am using .Net Framework 2.0 Beta and for testing firefox. I disabled JavaScript in Firefox and now the gridview sorting and paging does not work. Evenery link is calling, for example,...
1
by: the friendly display name | last post by:
Simple question: How to make datagrid paging work without javascript? I have a simple datagrid, which gets populated by a dataview, it works perfectly, paging works too, but, as I said, it...
1
by: rbg | last post by:
I am using derived tables to Page data on the SQL Server side. I used this link as my mentor for doing paging on the SQL Serverhttp://msdn2.microsoft.com/en-us/library/ms979197.aspx I wanted to...
8
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
10
by: MattC | last post by:
Hi, I wanted to take advantage of the Row_Number feature of SQL 2005 to to DB side paging. However, currently I perform my sorting on the front end. If I perform a sort and then ask for page...
2
by: madankarmukta | last post by:
Hi all, Can anybody tell me how to cutomize the logic for Paging? I designed the page with control dataGrid - AllowPaging is the property that perform Paging in the DataGrid.Can anybody tell me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.