Forum
12:19
10/08/2009
Hello Tony,
current implementation of jqGrid implement local sorting always case insensitive independent from the value of ignoreCase. In the pull request are described minimal changes for fixing the problem.
Best regards
Oleg
P.S. I think that one can improve performance of sorting additionally by reducing code of _compare used in sorting (not for searching) and by deviding one long code into parts for different types.
What I mean under reducing of the code is following: the values used for sorting will be first normalized in the lines. So every value used for camparing will be first normalized once. Then it can be used inside of _compare multiple times. Inside of _getOrder will be first test the type for date, int, float etc. At the moment one could choose different _compare implementation where one will not make tests like toString.call(a) === '[object Date]' && toString.call(b) === '[object Date]' for the column of the type "text" or "int". It should improve pervormance of local sorting.
To improve performance of local searching (filtering) one could use closures instead of strings (see inside of code fragments like 'jQuery.jgrid.getAccessor(this,\''+f+'\')' inside of _compareValues for example). Usage of eval inside of execute method (see here) make compilation of the code and execute it on the global context. The call of closures instead of eval could improve performance.
Most Users Ever Online: 715
Currently Online:
66 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