fnRender and visible columns

fnRender and visible columns

bill.martinobill.martino Posts: 38Questions: 0Answers: 0
edited July 2011 in General
Will code in an fnRender function only execute per column for VISIBLE columns only?

If not, it seems I could to a check for column visibility in my fnRender functions to speed up processing if it renders them whether they are visible or not.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    fnRender will run on columns regardless of visibility. It will run only once per cell, not on every draw, so the only way I think it would make a performance difference is if you simply didn't use fnRender on hidden columns (unless you are using ColVis or similar, in which case you will need it).

    Allan
  • bill.martinobill.martino Posts: 38Questions: 0Answers: 0
    Perfect, i am trying to tweak for IE performance and restricting hidden columns to only the most basic setup in the datatables initialization has helped some for sure.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    Don't get me started on IE performance. I like to pretend that IE doesn't exist.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    bDeferRender can make a huge difference in IE if you are using pagination and not server-side processing. Scroller might be worth checking out as well :-)

    Allan
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    does bDeferRender not work with server side? Can you not merge the 2 such that, even with a serverside call, creating out-of-view elements is deferred? I'm not sure I understand the distinction between deferred rendering for AJAX calls vs sever side processing.

    It's not terribly important, but I experimented with setting display length to 100 and even on Chrome my page is slow. I guess I will try to tweak performance and pull out bits of code that suck.

    Can you recommend any performance profiling tools and techniques for javascript? or does firebug/chrome debugger have tools for this?
This discussion has been closed.