Render build groups one at a time on index page #1588
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The index page is currently unacceptably slow for large projects due to a large rendering delay. On large dashboards such as the VTK dashboard, AngularJS takes in excess of 5 seconds to render once it receives a response from the API.
The render delay itself is an unavoidable limitation of AngularJS, but it's possible to hide some of it by prioritizing content at the top of the page. By rendering one build group at a time, we can put content in front of the user's eyes faster than if it was all rendered at once.
Although the total render time is still roughly the same, this PR drops the time before a user sees the first build group from 5 seconds to 1.5 seconds on the VTK dashboard. Since the user is unlikely to begin navigating the page before the other build groups render, the page appears to take 1.5 seconds to load.
In the future, the same approach could be applied to build rows within build groups. We could render the first hundred rows initially and then load the rest later.