Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Selecting rows slow with large grid
17/01/2010
06:59
Avatar
dw
Member
Members
Forum Posts: 8
Member Since:
07/06/2009
sp_UserOfflineSmall Offline

I have been doing some testing with large grids (45 columns and 1000 rows) and overall the performance is very good given the volume of data.  However, there is some slowness when changing between rows.  With a little profiling/debugging it appears that two things are contributing to the slowness:

1) scrollrows – if the scrollrows property is set to true this seems to add quite a bit of time to the amount of time it takes to switch rows.  Not sure if anything can be done about this, but for my code i just turn off scrollrows when the grid gets bigger than 100 rows

2) also in set selection there seems to be quite a bit of overhead for selecting the checkbox.  At least with IE.  I didn't test to see if the same overhead existing in firefox.  I made a slight change that seems to remove most of the overhead (old code in green commented out.  the change is in bold).  I beleive the change is correct, but i am not as familiar with the innerworkings of the grid, so i may be wrong. 

Even with these changes the switch of rows seems a bit slow, but it is definitely manageable.  If any has done similar testing and has any performance improvements/tips that they can pass along, it would be greatly appreciated. 

setSelection : function(selection,onsr) {

if( ia === -1 ){

if($(pt).attr(“class”) !== “subgrid”) { $(pt).addClass(“ui-state-highlight”).attr(“aria-selected”,“true”);}

stat =

true ;

// change – start – performance improvement for large grids

$(

“#jqg_”+$t.p.selrow.replace(“.”, “\\\\.”),pt).attr(“checked”,stat);

//$(”#jqg_”+$t.p.selrow.replace(”.”, “\\\\.”),$t.rows).attr(”checked”,stat);

//  change – end

$t.p.selarrrow.push($t.p.selrow);

if( $t.p.onSelectRow && onsr) { $t.p.onSelectRow($t.p.selrow, stat); }

}

else

{

if($(pt).attr(“class”) !== “subgrid”) { $(pt).removeClass(“ui-state-highlight”).attr(“aria-selected”,“false”);}

stat =

false ;

// change – start – performance improvement for large grid

$(

“#jqg_”+$t.p.selrow.replace(“.”, “\\\\.”),pt).attr(“checked”,stat);

//$(”#jqg_”+$t.p.selrow.replace(”.”, “\\\\.”),$t.rows).attr(”checked”,stat);

//  change – end

$t.p.selarrrow.splice(ia,1);

19/01/2010
11:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thanks. Definitley I will check this and if it is ok, will include the fix.

Best Regds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
48 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information