Ref T7708.
This changes things to $viewer->loadHandles where applicable in the durable column render stack. I saw some big wins on my test data like 34 queries => 24 queries on a newly created room as my default thread.
For my test data, the next big perf win would be to change how remarkup rendering works and try to multiload all objects of a certain type in one shot.
e.g. PhabricatorEmbedFileRemarkupRule implements loadObjects as do all classes which inherit from PhabricatorObjectRemarkupRule. This is because PhabricatorObjectRemarkupRule implements its didMarkupText method using loadObjects, and didMarkupText gets called per transaction over in PhabricatorMarkupEngine->process(). Instead, the loadObjects in didMarkupText should be hitting some cache, and we should do a bulk load for all PhabricatorEmbedFileRemarkupRule that had matches earlier in the rendering stack. ...I think.