Massively speed up datagrid rendering.

Review Request #4030 — Created April 7, 2013 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

Massively speed up datagrid rendering.

While investigating a slowdown with the new RBCommons deployment, I
realized we were creating a RequestContext over and over again. Once for
every rendered cell. It was excessive.

I've changed it to only create one RequestContext per request, total,
and to reuse those values for any new contexts used when rendering a
cell.

Prior to this, our weirdly slow RBCommons datagrid rendering on the new
instance was hovering around 6 seconds. After, it was at just around 1
second without any cached queries, and 0.5 seconds after.

While we still need to track down what's going on on that instance, I
can say that our datagrid rendering has never been faster.
Tested locally, and pages loaded instantaneously.

Deployed on RBCommons, and pages were *much* faster, especially once
queries were cached.

Unit tests pass.
    Loading...