jQuery UI Widgets Forums Grid IE (11) Randomly but often hits 'long running script'

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 9 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • lucasgraf
    Participant

    The grid works great in Chrome/Firefox but in IE i’d say 10-20% of the time it gets stuck and you get the ‘..not responding due to long running script’ Is there any way to prevent this?

    My grid is initialized like this…

     source =
                    {
                        datatype: "xml",
                        type: "POST",
                        formatdata: function (data) {
                            return "{'machineType': 'rdoMySystems', 'selectedPool': 'NA', 'bShowDeleted': 'false', 'bShow24Hours': 'false', 'bShowRedMachines' : 'false', 'selectedProfilingValues' : ''}";
                                },
                        datafields: [
                        { name: 'Id' },
                        { name: 'Name' },
                        { name: 'IpAddress' },
                        { name: 'GpuFamily' },
                        { name: 'GpuMarketingName' },
                        { name: 'GpuBoardNubmer' },
                        { name: 'GpuSku' },
                        { name: 'CurrentOs' },
                        { name: 'AvailableOs' },
                        { name: 'Heartbeat'},
                        { name: 'SliCapable' },
                        { name: 'Status' },
                        { name: 'Driver' },
                        { name: 'Location' },
                        { name: 'SystemRam' },
                        { name: 'Minutes' },
                        { name: 'Enabled' },
                        { name: 'IsFavoriteIcon' }
                        ],
                        record: 'MachineViewData',
                        url: 'GridData.asmx/GetMachines'
                    };
                    
            dataAdapter = new $.jqx.dataAdapter(source, { contentType: 'application/json; charset=utf-8' });
    
            $("#jqGridMachines").jqxGrid({
                source: dataAdapter,
                theme: 'energyblue',
                sortable: true,
                filterable: true,
                columnsresize: true,
                selectionmode: 'multiplerowsextended',            
                enabletooltips: true,
                groupable: true,
                columnsreorder: true,
                height: '100%',
                width: '100%',
                columns: [
                        { text: 'Id', dataField: 'Id', name: 'Id', width: 100, filterable: false  },
                        { text: '', dataField: 'IsFavoriteIcon', width: 30, cellsrenderer: faviconrenderer, pinned: true, resizable: false, filterable: false  },
                        { text: '', width: 30, cellsrenderer: vnciconrenderer, pinned: true, resizable: false, filterable: false  },
                        { text: 'Name', dataField: 'Name', name: 'Name',  pinned: true, cellclassname: cellconditioncheck, cellsrenderer: propertieslinkrenderer},
                        { text: 'IP Address', dataField: 'IpAddress', name: 'IpAddress',  cellclassname: cellconditioncheck, cellsrenderer: vnclinkrenderer },
                        { text: 'GPU Family', dataField: 'GpuFamily', name: 'GpuFamily', cellclassname: cellconditioncheck },
                        { text: 'GPU Mktg. Name', dataField: 'GpuMarketingName', name: 'GpuMarketingName', cellclassname: cellconditioncheck },
                        { text: 'GPU Board #', dataField: 'GpuBoardNubmer', name: 'GpuBoardNubmer', cellclassname: cellconditioncheck },
                        { text: 'GPU SKU', dataField: 'GpuSku', name: 'GpuSku',  cellclassname: cellconditioncheck },
                        { text: 'Current OS', dataField: 'CurrentOs', name: 'CurrentOs',  cellclassname: cellconditioncheck },
                        { text: 'Available OS', dataField: 'AvailableOs', name: 'AvailableOs', cellclassname: cellconditioncheck },
                        { text: 'Heartbeat', dataField: 'Heartbeat', name: 'Heartbeat', cellclassname: cellconditioncheck },
                        { text: 'SLI?', dataField: 'SliCapable', name: 'SliCapable', cellclassname: cellconditioncheck },
                        { text: 'Status', dataField: 'Status', name: 'Status', cellclassname: cellconditioncheck },
                        { text: 'Driver', dataField: 'Driver', name: 'Driver', cellclassname: cellconditioncheck },
                        { text: 'Location', dataField: 'Location', name: 'Location', cellclassname: cellconditioncheck },
                        { text: 'System RAM', dataField: 'SystemRam', name: 'SystemRam', cellclassname: cellconditioncheck },
                        { text: 'Minutes', dataField: 'Minutes', name: 'Minutes', cellclassname: cellconditioncheck },
                        { text: 'Enabled', dataField: 'Enabled', name: 'Enabled', cellclassname: cellconditioncheck },
                    ]
            });
    

    Then on radio button clicks I update it like this..

     function UpdateMachinesGrid(rdoType, selectedPool, selectedProfilingValues, bShowDeleted, bShow24Hours, bShowRedMachines)
        {
            rowCSS = new Array(); // reset 'cache' on update
            $('#jqGridMachines').jqxGrid('beginupdate');
            source.formatdata =
                    function (data)
                    {
                        return '{machineType: "' + rdoType + '", selectedPool: "' + selectedPool + '", bShowDeleted: "' + bShowDeleted + '", bShow24Hours: "' + bShow24Hours + '", bShowRedMachines: "' + bShowRedMachines + '", selectedProfilingValues: "' + selectedProfilingValues + '"}'
                    };
    
            
            $("#jqGridMachines").jqxGrid("updatebounddata");
            $('#jqGridMachines').jqxGrid('endupdate');
          
        }
    

    The data comes back from the server just fine but then like I said it will just hang, I am assuming in the various rendering functions but I am not 100% sure of that. It works fine (and is MUCH faster in Chrome/Firefox) but a lot of my users still insist on using IE and I can’t have it hanging like this. Any ideas?


    Dimitar
    Participant

    Hello lucasgraf,

    We recommend you remove the calls to beginupdate and endupdate. The updatebounddata method should not be called between these two. On a side note, you may need to call dataAdapter.dataBind() before updatebounddata to ensure the data adapter has the updated data before passing it to the grid.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    lucasgraf
    Participant

    I actually just put in the begin/end updates today to see if that would fix the issue, but it doesn’t seem to help. I will remove them.
    Is IE just slow due to it’s super slow javascript processing? 90% of the time it works fine, but then occasionally it hits that long script running. If i remove all the condition checks and stuff it is fine…but I need those 🙂


    Dimitar
    Participant

    Hi lucasgraf,

    As far as I can see there are no conditional statements in the provided code. Maybe the issue originates there. If you wish, you can share those lines of code, too.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.