Reputation: 757
Surely, it's not normal for a page to take over 30 seconds to load? I'm running a Django app on my local host and it was running quickly before I modified it with some bootstrap code. I'm new to bootstrap and Django so here's what I did in case I've made a mistake that's slowing it down.
1.) I right-clicked this page and selectED 'view page source' and then copied all the html into my Django app; http://getbootstrap.com/examples/carousel/
2.) Next, I clicked on all css and js links on the 'view page source' html and I copied those to my css and js folders within my static folder on Django.
3.) Next, I did a collectstatic command in Django to load the new css and js into my assets folder.
The site now appears as it should (looks great), but it takes between 30 seconds and a minute to load!!. It says in the bottom right of the screen 'looking up css' for almost the entire load period.
I must be doing something wrong? Was it necessary to copy the entire cssand js files, or just parts?
Maybe I should have linked to the css and js within the bootstrap/dist folder, but I thought it was best practice within Django to use thestatic folderfor such things?
Upvotes: 2
Views: 432
Reputation: 1811
A good first step analysis approach might be.to Use your browsers developer tools to analyze the bottleneck. For example for chrome press ctrl+shift+i to open them on windows. Select Network an reload your page. You should see a line and load speed (time) for every ressource including css and js files, images and so on.
maybe an external linked file taking long but you'll see.
For more info e.g. for chrome dev-tools see here chrome dev tools
Upvotes: 2