enketo-express
enketo-express copied to clipboard
loading performance idea: request form before main bundle is loaded
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
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()
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)