KNB site fails to load on slow connection
#1 Updated by Matt Jones about 8 years ago
Uncaught Error: Load timeout for modules: views/IndexView,views/AboutView,views/ToolsView,models/SolrHeader,models/SolrResult,text!templates/registryFields.html,text!templates/ldapAccountTools.html,text!templates/loading.html,jqueryui,views/SearchResultView,text!templates/search.html,text!templates/statCounts.html,text!templates/pager.html,text!templates/resultsItem.html,text!themes/knb/templates/mainContent.html,text!templates/currentFilter.html,async!https://maps.googleapis.com/maps/api/js?v=3&sensor=false&key=AIzaSyCjlUU0Wu…ckage.html,text!templates/publishDOI.html,text!templates/newerVersion.html
This error occurred on Chrome Version 31.0.1650.63 on Mac OS X 10.7.5.
On a slow/lossy connection, we still need to load the page. Maybe upon timeout we try to load a page with lower resolution images? Or some other workaround the speed issue?
#2 Updated by Lauren Walker about 8 years ago
- % Done changed from 0 to 50
- Status changed from New to In Progress
We can avoid the timeout error by adding a waitSeconds configuration to require.js (http://requirejs.org/docs/api.html#config-waitSeconds). I chose 180 seconds/3 minutes, which is an eternity in the internet world, but that at least allows the web app 3 minutes to load before throwing its hands in the air and giving up. The default setting for waitSeconds is 7, which is why on slow connections the app just doesn't seem to work at all.
The resources that take the longest to load are require.js, backbone.js, bootstrap.css, jquery.js, and all the images. (Followed by our backbone views and then templates).
I specified heights to all elements in the KNB landing page/featured data page so if their background images are still loading, the page still has the correct structure. I also added background images to the featured data and carousel elements so the white text can be read before images load (or fail to load).
I used Sloppy (http://www.dallaway.com/sloppy/) to test my local version of metacat/UI with different connection speeds. It would be great to have a dev server back again since Sloppy can't test https websites.
Testing on my local metacat/UI, connections speeds 1.5Mb and 3Mb completely load in less than 4 seconds. Once I slow down to 768k, it takes closer to 10 seconds. I will test again later once I get a dev server set up.
#3 Updated by Lauren Walker about 8 years ago
I was able to test out my local metacatUI pointing to the KNB metacat and the data catalog view loads within 1-4 seconds for speeds 3Mb and 1.5Mb. At 768k we get the header in at about 5 seconds then the page is complete at 10 seconds. After the initial load, interactions with the map are pretty responsive. I think lowering the Solr query rows down to 200 will work.
#4 Updated by Lauren Walker about 8 years ago
- Status changed from In Progress to Resolved
I talked with Ben and we agreed the load times are acceptable.
I added a "Loading" text to index.html so that when require.js, etc. are taking several seconds to load, the user will see something besides just a blank white page.
I created a ticket to the backlogs for researching how to stop Require.js from preloading all dependencies for every single view, causing one page view to load the entire website. This will most likely require substantial reconfiguration of require.js, but it will make metacatui load faster.