Lunarpages Web Hosting Forum

Author Topic: Bootstrap upgrade  (Read 812 times)

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6370
Bootstrap upgrade
« on: February 11, 2018, 08:48:39 AM »
My site has been running with Bootstrap 3.3.6 for several years. In recent weeks, it has greatly slowed down, taking as much as 15 seconds to load the first page of the day (although subsequent pages are reasonably fast). I'm wondering if the bootstrapcdn Bootstrap server is slow, and if it's because 3.3.6 is now so backlevel? In other words, if I upgrade my code to use the current Bootstrap version (4.0.0), should my pages load much faster, or is there something else going on? Would I be better off to cache a local copy of BS files on my site, rather than serving them from maxcdn.bootstrapcdn.com? That's what the canned apps I use seem to be doing (and they're still slow).

Some quick checking shows that there are a huge number of changes from BS 3 to BS 4, so it's more than just hitting a couple of PHP include files that pull in the four JS and CSS files (as well as the html5shiv and responsive files). I suppose I'll have to upgrade at some point, but should I stay at the last BS 3 release for a while? If that can be done by simply changing version numbers in the include files, rather than an extensive rewrite of my code, that will be good. What is the recommended BS 3 version to stay at? I will also need to hit some canned applications and their themes, which use BS (even older versions).

Does anyone have experience with this, and advice that they could share? Thanks much!
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1557
    • http://www.notonebit.com
Re: Bootstrap upgrade
« Reply #1 on: September 21, 2018, 07:13:19 AM »
Have you checked your browser's dev tools to see where the slowdown is coming from?
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6370
Re: Bootstrap upgrade
« Reply #2 on: September 21, 2018, 08:30:01 AM »
Whatever the issue was, it seems to have sorted itself out after a month or two. My site (both custom code and SMF forum) have been running at good speeds, so I haven't looked at it any further.

Should it happen again, what browser tools would be good for diagnosing the cause? I'm primarily on FF, but can use Chrome or Edge.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1557
    • http://www.notonebit.com
Re: Bootstrap upgrade
« Reply #3 on: September 24, 2018, 06:31:00 AM »
I primarily use Chrome but Firefox's dev tools are on par, and both have network tabs to monitor the delays in files being loaded. You can also look at the console tab for errors. You can go even deeper by profiling or auditing the page load.
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)