Pre-load the first diff in the diff viewer

Review Request #746 — Created Feb. 13, 2009 and submitted — Latest diff uploaded

Information

Review Board SVN (deprecated)
trunk

Reviewers

Despite the new progressively loading diff viewer being faster, many
users have commented that it feels slower. I believe this is because
with the old diff viewer, people were used to waiting for the page to
load, but pretty much mentally blocked that out. By the time it did
load, they could see the diffs and interact with them.

With the new diff viewer, the page itself loads instantly, but people
see a spinner on the diffs, leaving them to feel that the page is now
taking even longer to load (since the page itself has already loaded and
NOW they have to wait for diffs).

This change implements a trick to hopefully solve part of this
misconception. We now load the first diff on the page along with the
diff viewer, and progressively load all the other diffs. Users will see
the diff viewer load (still faster than the older diff viewer) and see
that first diff there, without seeing a spinner. They'll still see the
other diffs load if they scroll down or if the first change is really
small, but this should at least help with the perception issue in many
cases.
All files still load fine. Commenting works, jumping around the diff viewer works. I haven't seen any regressions from this change.