• 
      

    Improve the performance for datagrid setups.

    Review Request #7217 — Created April 16, 2015 and submitted — Latest diff uploaded

    Information

    Djblets
    release-0.9.x
    c3f0f96...

    Reviewers

    The datagrid needs to shuffle around some elements and their visibility
    when setting up state. This was involving one more loop than needed
    and some inefficient element lookups.

    We now use children() where possible, instead of find(), to do the
    lookups. Two for loops were also collapsed into one.

    There were also some redundant lines of code that could be replaced with
    pre-computed values.

    Last, but not least, the new thead is hidden until we build it and are
    ready to switch to it. This avoids some extra rendering.

    Tested with the browser performance tools. Saw some reductions in the paint
    and script execution time.

    Tested that things still rendered correctly on all browsers.