Skip to content

Load branch graphs asynchronously

What does this MR do?

Branch divergence graphs are loaded via AJAX so that generating them does not slow down the branches page

Are there points in the code the reviewer needs to double check?

  1. There are still some repos where the AJAX request will take a long time. I have not been able to verify it, so does leaving the branches page abort this request so that it is not still running even though it will be sent to a page that no longer is loaded?
  2. Right now the branch page will embed a URL that uses the same pagination/sorting parameters as the branches page. Profile shows that loading these branches again is extremely quick (just a few ms), but if a branch is added/removed between when the branches page is loaded and when the divergence info is loaded, the branches will not quite align. Nothing bad will happen besides missing some data which just won't appear, but might it be better to send some branch ID for each branch (either in the URL or body) and then loading the branches from this?

Why was this MR needed?

Allows branches pages to load quicker when it takes a longer time to calculate the branch divergence statistics

What are the relevant issue numbers?

#12619 (moved) (doesn't fix but improved)

Does this MR meet the acceptance criteria?

Merge request reports

Loading