tonytomov/jqGrid — pull request #283 by OlegKi (2012-03-26 10:55:24+00:00)
Title: Fixing the performance problem of TreeGrid during expanging or collapsing of nodes having large number of children

(copy of [the previous pull request](https://github.com/tonytomov/jqGrid/pull/278))

Hello Tony,

I described the problem in [the bug fix](http://www.trirand.com/blog/?page_id=393/bugs/slow-performance-of-treegrid-on-collapse-or-expand/#p26091). In the suggested code I improved my original suggestion by usage of `$($t.rows.namedItem(id))` instead of previously suggested `$("#"+$.jgrid.jqID(id))`. The current jqGrid code uses `$("#"+$.jgrid.jqID(id),$t.grid.bDiv)` which is very slow because no index can be used for the searching.

[The demo](http://www.ok-soft-gmbh.com/jqGrid/TreeGrid2.html) demonstrate the working of the fixed version which is much better as [the demo](http://www.ok-soft-gmbh.com/jqGrid/treegrid0.html) which uses jqGrid 4.3.1.

Best regards
Oleg

Signed-off-by: Dr. Oleg Kiriljuk