MyBB Community Forums

Full Version: Site is slow when logged in, fast when logged out?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

So for the past week I've noticed a significant speed downgrade in my forums performance. Every page takes forever to load. I realized that when I'm logged in this slow down happen but when I logged out as a guest the site runs normally with good speed.


I thought it might be an issue with my server but other sites on my server are fine. I also thought it might be because of my theme modifications but this speed issue also exists on the Default theme.
Man, I have always respected site, so I ran a critical analysis on your site. logged in.
https://sharree.com/Share-YouTube-Video-...ep--468076


Use google developer page speed insights, to get even more info

Remove unused JavaScript
2.72 s
Eliminate render-blocking resources
2.37 s
Reduce initial server response time
1.15 s
Properly size images
0.15 s
Defer offscreen images
0.15 s
Remove unused CSS
0.15 s


The irony is, logged out I got a worse response.


Remove unused JavaScript
3.81 s
Eliminate render-blocking resources
1.95 s
Reduce initial server response time
1.02 s
Serve images in next-gen formats
0.6 s
Remove unused CSS
0.45 s
Efficiently encode images
0.3 s
Defer offscreen images
0.15 s


Reduce JavaScript execution time 4.4 s
Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this.

URL
Total CPU Time
Script Evaluation
Script Parse
/Share-You…(sharree.com)
1,925 ms
12 ms
4 ms
/gtag/js?id=UA-137…-1(www.googletagmanager.com)
916 ms
857 ms
8 ms
…en_US/base.js(www.youtube.com)
734 ms
555 ms
117 ms
Unattributable
718 ms
5 ms
1 ms
…cloudflare-static/rocket-loader.min.js(ajax.cloudflare.com)
675 ms
557 ms
15 ms
…210/runner.html(tpc.googlesyndication.com)
649 ms
602 ms
8 ms
…current/osd.js?cb=%2Fr20100101(www.googletagservices.com)
325 ms
292 ms
13 ms
…r20190131/show_ads_impl_fy2019.js(pagead2.googlesyndication.com)
215 ms
159 ms
21 ms
/embed/OEgX3ClBdJA(www.youtube.com)
177 ms
88 ms
12 ms
/analytics.js(www.google-analytics.com)
151 ms
115 ms
22 ms
…www-embed-player.vflset/www-embed-player.js(www.youtube.com)
151 ms
127 ms
14 ms
…js/adsbygoogle.js(pagead2.googlesyndication.com)
132 ms
116 ms
11 ms
…element/element_main.js(translate.googleapis.com)
113 ms
48 ms
31 ms
…US/t_.js?cid=c010&cls=B(t.sharethis.com)
96 ms
82 ms
10 ms
/gtag/js?id=AW-754…(www.googletagmanager.com)
88 ms
78 ms
8 ms
/bg/1_03cBvoB….js(pagead2.googlesyndication.com)
83 ms
76 ms
6 ms
…MentionMe/thread.min.js(sharree.com)
78 ms
77 ms
1 ms
/jscripts/jquery.js?ver=1820(sharree.com)
71 ms
60 ms
7 ms
/js/sharethis.js(platform-api.sharethis.com)
69 ms
51 ms
10 ms
/jscripts/dvz_shoutbox.js(sharree.com)
60 ms
55 ms
3 ms
/gtag/js?id=UA-100…-1(www.googletagmanager.com)
50 ms
40 ms
8 ms


what do you think of this?
Hi,

without login in your forum I see a problem with an ajax request:
https://sharree.com/xmlhttp.php?action=dvz_sb_get_updates&first=206&last=225

It didn't stop after the first request, and keep requesting all the time:
[attachment=43286]

In 1 minute close to 40 requests from 1 user of the forum (me), if you have a lot of users, it'll collapse the forum with all the GET requests.

I'll search for more problems...

Edit 1: same thing happens when I'm logged in.

Edit 2: I didn't see any bigger problem. Just 2 tips:

Use dns-prefetch in your headerinclude to reduce server load from scripts/fonts/ads/images/etc. from other domains (like Google / Cloudflare / etc.):
https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch

Use async or defer in your scripts (not in all, the not essential ones), and loading="lazy" in the images of your server.
(2020-09-20, 11:28 AM)NoRules Wrote: [ -> ]Hi,

without login in your forum I see a problem with an ajax request:
https://sharree.com/xmlhttp.php?action=dvz_sb_get_updates&first=206&last=225

It didn't stop after the first request, and keep requesting all the time:


In 1 minute close to 40 requests from 1 user of the forum (me), if you have a lot of users, it'll collapse the forum with all the GET requests.

I'll search for more problems...

Edit 1: same thing happens when I'm logged in.

Edit 2: I didn't see any bigger problem. Just 2 tips:

Use dns-prefetch in your headerinclude to reduce server load from scripts/fonts/ads/images/etc. from other domains (like Google / Cloudflare / etc.):
https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch

Use async or defer in your scripts (not in all, the not essential ones), and loading="lazy" in the images of your server.


Thanks the dns-prefetch is helpful since I use a lot of content from external sources. Also looks like DvZ shoutbox is what was causing the slowdown. I've disabled the auto-refresh. As you said, it was causing too many requests with the shoutbox refreshing for each user.


Also thank you Michael for pointing out better optimization.