This is a jQuery UI bug.
Tony,
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.
Les
Tony,
I just wanted to point out that by HTML spec element IDs must be unique in a document
http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
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.
This is not a good test because the garbage collector has no chance to kick in.
Try setInterval(function() { }, 200) instead of while.
I don't see any memory increase after 100 invocations.
I found post this which explains that passing a context will slow things down when query is an ID.
http://stackoverflow.com/questions/2421782/preformance-of-jquery-selector-with-context
The same change can be made in 3.7.1 in expandNode() and collapseNode() – don't provide context when the query is by id.
I made this change and now performance is the same as in 3.6.5.
Tony,
Performance of expandRow() and collapseRow() in 3.7.1 will improve if you remove the context, see below.
The context is not needed because the query (by ID) maps almost directly to document.getElementById.
collapseRow : function (record) {
…
//$(“#”+id,$t.grid.bDiv).css(“display”,”none”);
$(“#”+id).css(“display”,”none”);
expandRow: function (record){
…
//$(“#”+id,$t.grid.bDiv).css(“display”,””);
$(“#”+id).css(“display”,””);
Tony,
I did some more testing and I have measurements taken on another faster computer.
I inserted console.tiime and console.timeEnd in this click handler in 3.6.5 and 3.7.1 (Firefox 3.6.3 and Win XP)
$(".treeclick",row).bind("click",function(e){
See the results on pictures (3.7.1 is 10 times slower)
jqGrid 3.6.5
http://img191.imageshack.us/img191/9291/tree365.png
jqGrid 3.7.1
http://img217.imageshack.us/img217/7056/treew.png
I'd like to work with you to resolve this issue.
Tony,
I see that you made some code changes in the way tree grid row expand and collapse in 3.7.1.
I see that remapColumns() will work for me.
As of Rel 3.6.3 Google Closure compiler is used:
/jqgridwiki/doku.php?id=wiki:change#jqgrid_3.6.4_changes_and_fixes
Oleg, hi!
Search for the addText method in this Highcharts code to see how the text rotation is done.
|
1 |
"addText: function(str, x, y, style, rotation, align)" |
http://highcharts.com/js/highcharts.1.2.src.js
Is this helpful?
Tony,
I believe you are suggesting to sortGrid() after reload.
I wanted to add more detail.
Oleg, if you want to continue to use jqGrid, this is still would be possible, but you will need to draw the vertical labels yourself.
See how this is done in Highcharts or jqPlot, which both allow to rotate labels to any degree.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top