tonytomov/jqGrid — pull request #423 by OlegKi (2013-02-07 08:30:11+00:00)
Title: improving performance of local sorting

Hello Tony,

the function `_compare` will be used for both local sorting and local filtering of data. I think that at least in case of local sorting one can use reduced form of the function. I didn't make any exact measurements, but short code must follow better performance.

The function `_getOrder` used during local sorting place first *normilized* values from the sorting column inside of `_sortData`. So no `undefined` and `null` values can be used during comparing in the case. One uses *different* implementation of function `findSortKey` (which I `normalizedSortKey`), so all `vSort` values have **the same** type. So the simplified version `_simpleCompare` or even as `_simpleNumberCompare` could be used. Only if one use function as `sorttype` the compared values cab be common and one can use more common `_compare` implementation.

Probably one can improve performance of `_getGroup` additionally by the usage `self._equals` without `null` as the first initial value of `last` variable. In the case one will be able to change `self._equals` to use `_simpleCompare` instead of `_compare`.

Best regards
Oleg