lundi 24 mars 2014

Improving App initial load time?

Just wondering if anyone can chime in here and what's best practices...



I have an app that has a sign on form and then various bits of functionality for when they've authenticated. I have two controllers that handle the sign on stage and then another for authenticated users.



At the moment, the build process puts everything into one app.js file, which is currently about 643KB. It means there's a bit of a wait when the app is loaded for the first time.



Is there any possibility to split the code into two files (or something similar) so when the app is initially 'loaded', it downloads the bits it needs for the sign on stage first and displays that immediately to the user. Then while that is happening, the app logic for authenticated users is loaded in the background?



Not sure this is right approach, but just looking to avoid having to download the entire app at the very start.



Suggestions?




Aucun commentaire:

Enregistrer un commentaire