Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
jqGrid SetRowData Slows down performance in IE when we upgraded to v 4.5.2
26/09/2013
22:13
Avatar
susan.dikramanjian
New Member
Members
Forum Posts: 2
Member Since:
26/09/2013
sp_UserOfflineSmall Offline

Hi (Zdravei),

We've been using jqGrid since 2008(v 3.7.1).

recently we upgraded both jQuery and JQGrid to the latest (one at a time so we can pinpoint issues easier)

After the JQGrid update we see a significant lag on the client side in one particular callback function (executed when the ajax call completes and used to load the data which came back into the grid).Here is part of the code which does the data populating:

for (var j = 0; j < newGridData.length; j++) {
            var rowIndex = newGridData[j].rowIndex;
            var rowData = newGridData[j].rowData;
            
            isSuccess = $grid.jqGrid('setRowData', rowIndex, rowData);
                    
        }

this function is called 500 times(that's the value of newGridData.length).

If I comment this one line (the one calling 'setRowData') the lag goes away.

Also when we used jQGrid v 3.7.1 we had no issues. Issues appear with version 4.5.2

This problem only happens when we use IE (version 9) - FF operates normally.

IE support howerver is a major requirement for us.

Thanks

Susan

26/09/2013
23:08
Avatar
susan.dikramanjian
New Member
Members
Forum Posts: 2
Member Since:
26/09/2013
sp_UserOfflineSmall Offline

Here is some more information on what is going on:

So we dug into the code for setRowData and pinpointed the exact line which caused the lag:

$(this.p.colModel).each(function(i){
                        nm = this.name;
                        var dval = $.jgrid.getAccessor(data, nm);
                        if (dval !== undefined) {
                           lcdata[nm] = this.formatter && typeof this.formatter === 'string' && this.formatter === 'date' ? $.unformat.date.call(t,dval,this) : dval;
                            vl = t.formatter( rowid, dval, i, data, 'edit');
                            title = this.title ? {"title":$.jgrid.stripHtml(vl)} : {};
                            if (t.p.treeGrid === true && nm === t.p.ExpandColumn) {
                                $("td[role='gridcell']:eq("+i+") > span:first",ind).html(vl).attr(title);
                            } else {
                               $("td[role='gridcell']:eq("+i+")",ind).html(vl).attr(title);
                            }
                        }
                    });

The highlighted line is the one which causes the lag - and it basically just putting the data into the cell so I am not sure why it is slow.

I checked the same function in v 3.7.1 and it looks like this line has not changed....any insight would be helpful

THanks

Susan

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
27 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information