Need to speed up datatables - bSortClasses ?

Need to speed up datatables - bSortClasses ?

zirconxzirconx Posts: 7Questions: 0Answers: 0
edited September 2010 in General
I need to speed up a page that is using datatables. Sometimes have 500-5000 rows. I see bSortClasses: false can be used to speed it up. I tried this and it seems to have cut the loading time in half. But I can still sort the columns just fine. So what exactly does bSortClasses: false do?

The documentation says: Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and 'sorting_3' to the columns which are currently being sorted on.

Sorry but I don't have a clue what that means. Thanks for any help.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Have a look at the table here: http://datatables.net - look at the first column. It is shaded slightly differently - indicating that it is the sorting column. That's what bSortClasses does. With it disabled, DataTables doesn't add the classes needed for that (it's a fairly slow process as you are seeing). It doesn't stop you from doing sorting though!

    Allan
  • zirconxzirconx Posts: 7Questions: 0Answers: 0
    Ah, I understand now. Thank you.
This discussion has been closed.