I see that you made some code changes in the way tree grid row expand and collapse in 3.7.1. I'm almost certain this is the cause of performance degradation.
The problem is easy to reproduce. Just try to access the jqGrid demo application:
Click for instance on "New in Version 3.5″. The demo application is using 3.7.1 and you will see that the rows expand and collapse slowly with just 9 children. This used to be fast in the previous 3.6.5 version.
Majority of my users use old Pentium laptops (Win XP and IE7), which I used for testing.
I you want I can upload a test application. It's rather large but very easy to install.
I'm painfully aware that the jqGrid will create elements with duplicate ids (not only in rows but also in column headers) when there are two grids populated with the same data.
I hope you realize that this is a really bad design. Right now you have two problems: the markup is still bad and the grid is much less scalable because you added an inefficient piece of JavaScript to guard against the bad html.
I suggest instead of introducing new features, you concentrate on fixing the underlying architecture.
Thanks Les. Absolutley you are right, but if we fix this, nobody can continue to use the new versions – they should rewrite your code from the beginning.
For the column headers and other duplicate ids we can fix these, but the big questions is what to do with the rows ids?
Example: I have a table with primary keys 1,2,3.. and another table with the same primary keys numbering due of using the autoincremet property and I want to use these keys when I do CRUD operations.
In the same time I need to display both grids in one page – so the question is: how we can make these rows uniquie and in the same time to use the primary keys values?
Perhaps you will need to make some tough decisions and brake backward compatibility in order to fix the markup.
Right now we are not able to upgrade to 3.7.1, and it's not because of the duplicate ids but because of the JS patch that you added to guard against the duplicate ids.
did you by any chance have a look at optimizing treegrid (not only expandRow and collapseRow, but also loading) ?
I've tried 3.8 version with latest jQuery UI but except the expandRow and collapseRow that are indeed really slower (we used 3.6.4 before), loading is the same.
For the column headers and other duplicate ids we can fix these, but the big questions is what to do with the rows ids?
Example: I have a table with primary keys 1,2,3.. and another table with the same primary keys numbering due of using the autoincremet property and I want to use these keys when I do CRUD operations.
In the same time I need to display both grids in one page – so the question is: how we can make these rows uniquie and in the same time to use the primary keys value
Hello Tony,
In my option, i should make it by this way:
use grid-container-id (eg. 'treegrid') as prefix of rows ids (eg. 'treegrid_1/treegrid_2/treegrid_3'). when CRUD then substr the prefix — this action can be done by client side before starting post, or by server side after receive the post data (must post the prefix as individul key:value togather)