canvas-lms/packages/js-utils
Ryan Shaw 50cb8d8388 Fetch things sooner on the dashboard
closes: CORE-2904 CORE-2905 CORE-2906

This will send the XHR requests for the dashcards and for all the stuff
in the planner dashboard sooner. As in, as soon as the html document 
comes back from the server, instead of waiting until all the js bundles
have downloaded and executed. This should remove a round-trip from
the dashboard page and you should notice the planner and dashcard
dashboards complete loading a lot faster. By sending the requests
sooner, our app servers can work on them while the browser is 
downloading all the rest of the JS that it needs to run the page. And 
by having our app servers work on that at the same time the browser 
works on the JS, the entire page will complete loading faster.

Test plan:
* go to the planner dashboard
* you should see 4 requests with the type “fetch” in the network panel
  in the waterfall right at the same time the html document is returned
* you should not see any more XHRs sent from axios on page load for the
  planner dashboard (it should use the prefetched ones)
* in a prod environment, where you have multiple app server processes
  handling requests, the planner dashboard should complete loading a lot
  faster

* In that same prod like environment, go to the dashcard dashboard
* same thing, it should issue a “fetch” request right with the html
  document comes back from the server and not issue an second
  XHR once the JS is loaded.
* it should be complete loading significantly faster too.


Change-Id: I0503c1a4d913fd1baa4dad22b9a88333ff747c0d
Reviewed-on: https://gerrit.instructure.com/192161
Tested-by: Jenkins
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2019-05-17 15:55:59 +00:00
..
src Fetch things sooner on the dashboard 2019-05-17 15:55:59 +00:00
package.json Fetch things sooner on the dashboard 2019-05-17 15:55:59 +00:00