MyBB Community Forums

Full Version: Slow Page Loading
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
We have recently migrated a fairly large forum from jcink/ipb1.3 to MyBB 1.8 and are struggling a bit with loading times. For the most part it's working okay, but I can see in my cpanel that we are often getting to 90+% CPU usage and users are complaining about loading times. Sometimes pages load in a few seconds, other times it can take 15 seconds or longer to load a page. I'm hoping someone is able to take a look and see if they can think of anything to improve the load times.

URL: http://simulationhockey.com
one thing is that it's trying to access this file which cannot be found: http://platform.twitter.com/widgets.js (not https ?)
seems like other parts of the page are waiting for it to load.

you might also want to check these results: http://validator.w3.org/check?verbose=1&...key.com%2F
(2018-06-28, 03:48 PM)linguist Wrote: [ -> ]you might also want to check these results: http://validator.w3.org/check?verbose=1&...key.com%2F


This is quite helpful, I will go through and try to clean some of that up. This mostly seems like open tags, would that actually cause high CPU usage?
At my forum it was mostly runaway .js stuff,e.g. fontawesome-all loading incompletely and then blocking other scripts that won't load before it finished. I got some relief from using the "defer" attribute with a few of the bigger scripts that need nor rund while the page is loading: https://www.w3schools.com/tags/att_script_defer.asp

With the chrome developer tools, i also get a few errors and warnings, mostly about widgets and embedded js . You should check those for yourself (if you have chrome, other browsers have similar tools for site debugging.)
(2018-06-28, 05:48 PM)linguist Wrote: [ -> ]At my forum it was mostly runaway .js stuff,e.g. fontawesome-all loading incompletely and then blocking other scripts that won't load before it finished. I got some relief from using the "defer" attribute with a few of the bigger scripts that need nor rund while the page is loading: https://www.w3schools.com/tags/att_script_defer.asp

With the chrome developer tools, i also get a few errors and warnings, mostly about widgets and embedded js . You should check those for yourself (if you have chrome, other browsers have similar tools for site debugging.)

I tried deferring a few scripts, but the parts of the page that rely on those scripts stopped working. I will try working with chrome debugging though. Hopefully that leads me somewhere. The site is working a bit better today than it was yesterday, so maybe some of my changes are making an impact now.
One thing that is extremely helpful is the debug information shown to administrators at the bottom of forum pages. It should look a bit like this:

Generated in 152 ms (17.42% PHP / 82.58% MySQL)
SQL Queries: 37 / Server Load: 0.44 / Memory Usage: 4 MB

If you could share that information it would be really useful.
(2018-06-28, 07:04 PM)Euan T Wrote: [ -> ]One thing that is extremely helpful is the debug information shown to administrators at the bottom of forum pages. It should look a bit like this:

Generated in 152 ms (17.42% PHP / 82.58% MySQL)
SQL Queries: 37 / Server Load: 0.44 / Memory Usage: 4 MB

If you could share that information it would be really useful.

In showthread.php:

Generated in 3.007 seconds (92.56% PHP / 7.44% MySQL) 
SQL Queries: 25 / Server Load: 68.2 / Memory Usage: 95.75 MB

In index.php:

Generated in 3.401 seconds (94.86% PHP / 5.14% MySQL) 
SQL Queries: 13 / Server Load: 66.96 / Memory Usage: 95.5 MB

In forumdisplay.php

Generated in 7.334 seconds (95.27% PHP / 4.73% MySQL) 
SQL Queries: 19 / Server Load: 76.86 / Memory Usage: 95 MB



These are just random samples, the load time varies quite a bit in each of them each time I refresh.
The server load is pretty high there, as is the page generation time. I assume this is shared hosting? If so do you mind sharing which host? Can you list the plugins that you have installed too?
(2018-06-28, 07:18 PM)Euan T Wrote: [ -> ]The server load is pretty high there, as is the page generation time. I assume this is shared hosting? If so do you mind sharing which host? Can you list the plugins that you have installed too?

Inmotion, we are on the highest shared hosting plan (Pro). 

Plugins right now are just:
MyAlerts
MentionMe
Advanced Sidebox

I can PM you a dump of the detailed debug page if you'd like.
(2018-06-28, 07:39 PM)DrunkenTeddy Wrote: [ -> ]
(2018-06-28, 07:18 PM)Euan T Wrote: [ -> ]The server load is pretty high there, as is the page generation time. I assume this is shared hosting? If so do you mind sharing which host? Can you list the plugins that you have installed too?

Inmotion, we are on the highest shared hosting plan (Pro). 

Plugins right now are just:
MyAlerts
MentionMe
Advanced Sidebox

I can PM you a dump of the detailed debug page if you'd like.

None of those should cause a problem I wouldn't think. A full dump of the detailed debug page would help, but I likely won't get a chance to look at it until Sunday I'm afraid - so it may be a few days before you hear anything back from me.
Pages: 1 2 3