Narayana
Narayana

Reputation: 2744

Improve RadGrid client side performance

I've an aspx page that renders a programmatically created RadGrid. There are about 15 columns, and just over 1000 rows. It takes about 6-7 seconds from load to finish, out of which only 3 secs are server-side processing. I can definitely optimize this. But the remaining 4 seconds seem to be happening after the client has received the response from the server.

I took a look at Chrome's timeline, and this is what I see: enter image description here

Based on this, I'm guessing that the browser is trying to parse and render the page for the last 4 seconds. What do I do now? Can I dig in further to see why?

What do these mean? That the Radgrid is emitting too much code for the browser to handle?

  1. Paging is turned ON, but customer wants to see at least 1000 records per page.
  2. Sorting, paging, row selection, row-right-click menu etc. are all enabled/available.

Thanks for helping, please let me know if you need more information.

Upvotes: 2

Views: 4098

Answers (1)

loislo
loislo

Reputation: 14119

I see in your timeline that only 1 sec was used for execution JS code. The rest of the time was used for layout. You need to modify the code somehow and reduce the number of places where you force layout. I think this document could be interesting for you. http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html

The other way is to use a viewport schema. As example you need to create rows only for a visible part of the page and use empty divs with necessary size for the invisible parts. It is common practice that uses when the amount of data is quite big. As example Sources panel works that way and can show a file with 500k lines of code.

The same technique is used in Timeline panel.

Upvotes: 2

Related Questions