Add dynamic loading of diff comment fragments to the review request page

Review Request #636 — Created Nov. 13, 2008 and submitted

Information

Review Board SVN (deprecated)
trunk

Reviewers

Loading the review request page can be slow when there are reviews on parts of diffs that are no longer cached. This will cause the page to not load until all diff fragments are generated. On long reviews with many iterations, this is particularly slow.

This introduces dynamic loading of the diff fragments. Instead of showing the fragment inline, we now show a little "Loading diff fragment..." box with a spinner, and queue up loading of each comment. Future reloads are much faster.

We can probably speed this up even more later by doing some aggressive browser-side caching, but for now it's pretty quick.
Tested with some review requests I have in my local devel tree. I cleared the local cache and then loaded the page. The review request page came up instantly, with the diff fragments progressively loading as the files were fetched from SVN and the diffs generated.
david
  1. Do you need to add spinner.gif to your change?
    1. There's already a spinner in the code tree at:
      /htdocs/media/rb/images/dlg-spinner.gif
      
      ..so prefixing 'dlg-' on the URI would do it.
    2. That spinner's scheduled to be deleted in my UI rewrite. The "dlg-" makes no sense and it has a non-transparent background.
      
      I've fixed my change locally to include spinner.gif. Could have sworn I added it before, but I guess not. Anyhow, thanks for the review! I'll commit it tonight.
  2. 
      
Loading...