Forum
17:24
11/07/2011
I've implemented some performance improvements to remapColumns function, but I couldn't do properly exhaustive testing, and I'm also not very deeply familiar with jqGrid. So what I'm saying is, these changes might negatively affect something I didn't think of, so if anyone has the inclination to do some further testing I'd appreciate it. Or even just take a look at the code and double check I'm not doing something stupid.
In any case, I've forked jqGrid on github and here are the changes to grid.base.js. They are fairly straitforward but here's a quick outline.
- Put a check to make sure the remap is actually needed. remapColumns is called by columnChooser (and possibly other functions) with original order, so I run a quick loop and make sure to only proceed if there's been a change in the order of columns.
- Replaced $.each loops in both resortArray and resortRows with for loops.
- Changed rows selectors to use parent.find instead having parent as context (tiny improvement but also costs nothing).
The actual improvements in speed ended up being only about 10% (my data has 345 rows and 13 columns). However, the number of calls made was reduced almost five times. (I used firebug's console.profile to get these numbers)
18:36
10/08/2009
If you made some reset with ColumnChooser try to repeat the test after the simple fix described here. The fix is already in the github code.
Most Users Ever Online: 715
Currently Online:
52 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66