enketo-express icon indicating copy to clipboard operation
enketo-express copied to clipboard

loading performance idea: request form before main bundle is loaded

Open enketo-issue-mover opened this issue 6 years ago • 2 comments

From @MartijnR on May 18, 2018 15:53

Atm, the large JS bundle is loaded first, after which the form is loaded (by the js is bundle). Would be ~~very~~ worthwhile to split that up.

Copied from original issue: kobotoolbox/enketo-express#1028

enketo-issue-mover avatar Oct 25 '18 23:10 enketo-issue-mover

From @MartijnR on May 18, 2018 16:7

I think this could be done by:

  • [ ] changing connection.getFormParts() to a GET request. We may be able to just use a fixed URL (same for every form) and determine the parameters from the origin of the request (so on the server).
  • [ ] using <link rel="preload"> for the URL in that request
  • [ ] test all views
  • [ ] to the same with connection.getInstance()

enketo-issue-mover avatar Oct 25 '18 23:10 enketo-issue-mover

From @MartijnR on May 18, 2018 16:16

It will approximately save the time it takes to download the js bundle file (not hugely significant)

enketo-issue-mover avatar Oct 25 '18 23:10 enketo-issue-mover