IE8, some script causing slow your web browser

IE8, some script causing slow your web browser

waqarwaqar Posts: 5Questions: 0Answers: 0

Hi Allan,
First of all, congrats to develop such gr8 tool. I am using datatable 1.10 with sAjaxDataSource, everything is working perfectly fine in chrome and other browsers except IE8, but the main problem is i need it to work perfectly on IE. the only problem i am facing is IE8 is showing message of script slowness once in 10 page refresh. I have tried all the provided solutions on blogs including disabling bSortClasses etc, but it doesn't work for me. Kindly look into the matter, where im doing wrong.
Any immediate help and guidance would be highly appreciated.

Replies

  • waqarwaqar Posts: 5Questions: 0Answers: 0

    Update : i was facing same issue in previous version i.e 1.9.4, upgrading version doesnt make any difference as well except now showing message once in a 10 times page refresh.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Are you ajax loading the data and do you have deferred rendering enabled? If not, then do that. IE8 is a very old browser now and its script engine is very slow, so inevitably it will be a lot slower when you ask it to do more. How many rows and columns do you have? Can you please link to a test case?

    Allan

  • waqarwaqar Posts: 5Questions: 0Answers: 0
    edited May 2014

    Thanks for such an immediate response, due to some privacy reason i can't link any test case yet, though i am copying some initialization code which can help u to understand :

    $(document).ready(function () {
            $("#example").dataTable({
                "sPaginationType": "full_numbers",
                "bProcessing": true,
                "bPaginate": true,
                "bjQueryUI": true,
                "bAutoWidth": false,
            "bDeferRender": true,
                "sAjaxSource": "my.scv path",
                "aoColumns": [
                    { "mData": "ReferenceNumber", "sClass": "left" },
                    { "mData": "Subject", "sClass": "left" },
                    { "mData": "DateInitiated", "sClass": "center" },
                    { "mData": "InitiatedByName", "sClass": "left" },
                    { "mData": "Details", "bSortable": false, "sClass": "center" },
                    { "mData": "Status", "bSortable": false, "bVisible": false },
                    { "mData": "InitiatedByID", "bSortable": false, "bVisible": false },
                    { "mData": "ManagerID", "bSortable": false, "bVisible": false }
                ]
            });
    
  • waqarwaqar Posts: 5Questions: 0Answers: 0

    hey Allan, just figured it out that by setting "ordering": false , the issue has been resolved, and its working awesome for 15000 + rows as well. But i need to allow sort in first 4 columns. Kindly guide me how to achieve this.

    Thanks in advance..

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I would suggest that you need to use server-side processing if you need lots of rows in old versions of IE.

    The other thing you could do is remove your columns that are hidden. There is no point in creating them and then hiding them - that is just eating clock cycles for no reason.

    Further more, don't ass sClass left - just have a default in your CSS and only apply the center class as needed. DOM manipulation in old IE is slow!

    Allan

  • waqarwaqar Posts: 5Questions: 0Answers: 0

    hey Allan,

    Thanks for your kind suggestions, i have changed my code as u suggested but that doesn't make any difference while making "ordering": false has solved the issue.

    i can't ignore the hidden columns as i m applying some filtering on the basis of those columns,

    i need to allow sorting in first 3 columns i.e clients requirement so i cant go without it but as i remove "ordering": false, the message of slow scripting start to show again.

    any other solution that i can apply?

    one more thing i need to ask how can i display or hide columns on any particular event.

    Looking forward for ur wise suggestions.

    Regards,

    Thanks

This discussion has been closed.