Can't reduce the avg. Page Load Time (Analytics) of my Forums - Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • M.Scheel
    Senior Member
    • Sep 2001
    • 482
    • 5.7.0

    [Forum] Can't reduce the avg. Page Load Time (Analytics) of my Forums - Help

    Hi

    I have several vBulletin Forums, some heavily modified, some little.
    Anyways I am tracking the page load speed with Google Analytics and no matter what I do to increase performance,
    I can't get the average page load speed below 10 Seconds for www.Patientenfragen.net which is really slow.

    I have:
    - APC Cache enabled
    - vBOptimize Pro reducing queries and caching pages for Guests
    - I use a CDN Pull Zone for CSS, JS and Images
    - I reduced the number of templates loaded when a thread is viewed (like all vBulletin Ad Templates, spacer, etc).
    - I set my server to DEFLATE html htm php css js xml txt
    - Cache Control is set to cache static content for 30 days via htaccess
    - WOL is removed for guests
    - CSS-Stylesheets stored as files

    Forum Stats: 7500 users, 400 active
    Around 200 Users average online, max users online 685
    NIX Load < 1.0

    I guess that a big thing slowing down my Website is using DFP Ad Server and Google AdSense.
    But one of my Forums www.AdSenseExperts.com does not use DFP or AdSense and still has an Average Page Load Time of 7 Seconds.

    I would be interested in your avg page load speed from Analytics.
    What did you do to speed up your forum?
    Michael Scheel
    Facharzt für Kinder- und Jugendmedizin

    Web: www.Kinderarzt-Cuxland.de
    Facebook: Kinderarzt.Cuxland
    Instagram: Kinderarzt.Cuxland
  • Final Kaoss
    Senior Member
    • Nov 2006
    • 581

    #2
    Replace the contents of your htaccess file with this.

    Code:
    # Author: Matty Asia
    # Version 1.6
    # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.76 \[en\] \(Windows NT 5\.0; U\)"
    RewriteRule .* - [F,L]
    Options +FollowSymLinks
    ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED
    #RewriteRule ^includes/(.*) index.php
    #RewriteRule ^vb/(.*) index.php
    #RewriteRule ^packages/(.*) index.php
    ### THIS IS THE ACTUAL REWRITE
    RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING}
    RewriteRule ^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) blog.php?u=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) entry.php?b=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING}
    RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
    RewriteRule ^widget/config/([0-9]+) widget.php?r=config/$1&%{QUERY_STRING}
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^$ $1.php?r=$2 [QSA]
    
    
    
    ## Rewrites
    RewriteEngine on
    Options +FollowSymlinks
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    
    
    # Forum
    RewriteRule ^threads/.* showthread.php [QSA]
    RewriteRule ^forums/.* forumdisplay.php [QSA]
    RewriteRule ^members/.* member.php [QSA]
    RewriteRule ^blogs/.* blog.php [QSA]
    ReWriteRule ^entries/.* entry.php [QSA]
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    ErrorDocument 404 /404.php
    ErrorDocument 403 /404.php
    ErrorDocument 500 /404.php
    RewriteEngine On
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^site.com
    RewriteRule (.*) http://www.site.com/$1 [R=301,L]
    
    
    
    
    
    
    
    # Cache static content for 1 MONTH
    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|css|js|txt|xml)$">
    Header set Cache-Control "public"
    Header set Cache-Control "max-age=2592000, public"
    Header unset Last-Modified
    </FilesMatch>
    
    # Remove ETag headers
    Header unset ETag
    FileETag None
    
    # compress text, html, javascript, css, xml:
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript

    Comment

    • M.Scheel
      Senior Member
      • Sep 2001
      • 482
      • 5.7.0

      #3
      Why would I do that?
      I use vBSEO for rewriting URLs, I use DEFLATE already, ETAG is off, static content is already cached.

      Where is the "magic" in your htaccess?
      Michael Scheel
      Facharzt für Kinder- und Jugendmedizin

      Web: www.Kinderarzt-Cuxland.de
      Facebook: Kinderarzt.Cuxland
      Instagram: Kinderarzt.Cuxland

      Comment

      • Final Kaoss
        Senior Member
        • Nov 2006
        • 581

        #4
        When we were all active yesterday trying to increase our page load speed, that's the final result I ended up with via this thread.

        Comment

        • Final Kaoss
          Senior Member
          • Nov 2006
          • 581

          #5
          Have a look at this, it should help you some

          Comment

          • Ramsesx
            Senior Member
            • Aug 2005
            • 3254
            • 3.8.x

            #6
            Hasn't been VBSEO known as a speed brake?
            .......

            Comment

            • M.Scheel
              Senior Member
              • Sep 2001
              • 482
              • 5.7.0

              #7
              Thanks for trying to help me but I already have done everything you suggested.
              If you look closer to the result page you'll see that everything that is not optimized is
              outside of my control like Google adsense javascript.

              Originally posted by Ramsesx
              Hasn't been VBSEO known as a speed brake?
              Not as far as I know.
              It is not the page generation time (php & mysql wise) it is the execution of javascript that
              prolongs the loading time in Analytics. The page renders very fast in my browser but finishing all javascripts
              takes time sometimes

              It is that I am more interested in your Google Analytics Page Load Time
              Michael Scheel
              Facharzt für Kinder- und Jugendmedizin

              Web: www.Kinderarzt-Cuxland.de
              Facebook: Kinderarzt.Cuxland
              Instagram: Kinderarzt.Cuxland

              Comment

              • Dirt Bike Addict
                Senior Member
                • May 2010
                • 828
                • 4.1.x

                #8
                Starbug, you have a total of 23 .js requests on that page, anyway you could cut down on those? Also where did you put your DFP .js?

                You also have to remember that this is somewhat dependent on the users internet speed and also the page they're visiting. For example I can load most pages on my site in 3 seconds or less (have a 50mb connection), however my Site Speed is generally between 4-5 seconds.

                Just went and checked mine, found something pretty interesting.

                User type Load time
                USA/Canada Logged In 3.81 sec
                USA/Canada Not Logged In 5.77 sec
                Non USA/Canada 9.14 sec


                Originally posted by scylla22
                Replace the contents of your htaccess file with this.
                Wow you have a lot of extra stuff (rewrites) in there that I wouldn't be telling people to put in their .htaccess. This is generally about the only thing you want to tell people to add, providing that they don't already have something similar.

                Code:
                # Cache static content for 1 MONTH
                <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|css|js|txt|xml)$">
                Header set Cache-Control "public"
                Header set Cache-Control "max-age=2592000, public"
                Header unset Last-Modified
                </FilesMatch>
                
                # Remove ETag headers
                Header unset ETag
                FileETag None
                
                # compress text, html, javascript, css, xml:
                AddOutputFilterByType DEFLATE text/plain
                AddOutputFilterByType DEFLATE text/html
                AddOutputFilterByType DEFLATE text/xml
                AddOutputFilterByType DEFLATE text/css
                AddOutputFilterByType DEFLATE application/xml
                AddOutputFilterByType DEFLATE application/xhtml+xml
                AddOutputFilterByType DEFLATE application/rss+xml
                AddOutputFilterByType DEFLATE application/javascript
                AddOutputFilterByType DEFLATE application/x-javascript

                Comment

                • M.Scheel
                  Senior Member
                  • Sep 2001
                  • 482
                  • 5.7.0

                  #9
                  Originally posted by Dirt Bike Addict
                  Starbug, you have a total of 23 .js requests on that page, anyway you could cut down on those? Also where did you put your DFP .js?
                  DFP JS is AFTER the </header> to not slow down page rendering.
                  Unfortunatly I can't cut down JS requests because most of them are AdSense, and the few others besides vBulletins own JS are from my other advertising marketer.

                  Originally posted by Dirt Bike Addict
                  You also have to remember that this is somewhat dependent on the users internet speed and also the page they're visiting. For example I can load most pages on my site in 3 seconds or less (have a 50mb connection), however my Site Speed is generally between 4-5 seconds.
                  I noticed when I was analyzing my website with chrome dev tools that one flash Ad served via Google was re-requesting a statistic file over and over again for over 50 seconds.
                  This would explain why analytics sometimes shows page load time of 200+ seconds for a thread.

                  Originally posted by Dirt Bike Addict
                  Just went and checked mine, found something pretty interesting.

                  User type Load time
                  USA/Canada Logged In 3.81 sec
                  USA/Canada Not Logged In 5.77 sec
                  Non USA/Canada 9.14 sec
                  Of course foreign requests take longer to be served then in country requests.
                  If I request a website from a server based in USA it takes longer then requesting a page from a server in Germany.


                  Originally posted by Dirt Bike Addict
                  Wow you have a lot of extra stuff (rewrites) in there that I wouldn't be telling people to put in their .htaccess. This is generally about the only thing you want to tell people to add, providing that they don't already have something similar.

                  Code:
                  # Cache static content for 1 MONTH
                  <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|css|js|txt|xml)$">
                  Header set Cache-Control "public"
                  Header set Cache-Control "max-age=2592000, public"
                  Header unset Last-Modified
                  </FilesMatch>
                  
                  # Remove ETag headers
                  Header unset ETag
                  FileETag None
                  
                  # compress text, html, javascript, css, xml:
                  AddOutputFilterByType DEFLATE text/plain
                  AddOutputFilterByType DEFLATE text/html
                  AddOutputFilterByType DEFLATE text/xml
                  AddOutputFilterByType DEFLATE text/css
                  AddOutputFilterByType DEFLATE application/xml
                  AddOutputFilterByType DEFLATE application/xhtml+xml
                  AddOutputFilterByType DEFLATE application/rss+xml
                  AddOutputFilterByType DEFLATE application/javascript
                  AddOutputFilterByType DEFLATE application/x-javascript
                  And even that code is not optimized
                  Code:
                  Header unset Pragma
                  FileETag None
                  Header unset ETag
                  AddOutputFilter DEFLATE xhtml html htm php css js xml xsl txt
                  
                  <IfModule mod_expires.c>
                  ExpiresActive On
                  ExpiresDefault "access plus 1 month"
                  
                  ExpiresByType image/gif A2592000
                  ExpiresByType image/png A2592000
                  ExpiresByType image/jpg A2592000
                  ExpiresByType image/jpeg A2592000
                  ExpiresByType image/x-icon A2592000
                  ExpiresByType text/plain A2592000
                  ExpiresByType text/css A2592000
                  ExpiresByType text/js A2592000
                  ExpiresByType application/x-javascript A2592000
                  ExpiresByType application/pdf A2592000
                  ExpiresByType application/x-shockwave-flash A2592000
                  </IfModule>
                  
                  <IfModule mod_headers.c>
                  <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|css|js)$">
                  Header set Cache-Control "max-age=2592000, public, must-revalidate"
                  Header unset Last-Modified
                  </FilesMatch>
                  <FilesMatch "\.(xml|txt)$">
                  Header set Cache-Control "max-age=172800, public"
                  Header unset Last-Modified
                  </FilesMatch>
                  <FilesMatch "\.(xhtml|html|htm|xml|xsl|php)$">
                  Header set Cache-Control "max-age=3600, public"
                  </FilesMatch>
                  </IfModule>
                  Michael Scheel
                  Facharzt für Kinder- und Jugendmedizin

                  Web: www.Kinderarzt-Cuxland.de
                  Facebook: Kinderarzt.Cuxland
                  Instagram: Kinderarzt.Cuxland

                  Comment


                  • PAPPACLART
                    PAPPACLART commented
                    Editing a comment
                    Wow, I added that optimized code and it seems to have made a big difference to my site speed. I am sure I Am not imagining it. Thanks
                • Dirt Bike Addict
                  Senior Member
                  • May 2010
                  • 828
                  • 4.1.x

                  #10
                  Originally posted by StarBuG
                  DFP JS is AFTER the </header> to not slow down page rendering.
                  Unfortunatly I can't cut down JS requests because most of them are AdSense, and the few others besides vBulletins own JS are from my other advertising marketer.
                  Why not serve everything through DFP, I run Adsense and another ad network through it.

                  And on a side note, I actually found it faster when it was put in the headinclude.

                  Comment

                  • M.Scheel
                    Senior Member
                    • Sep 2001
                    • 482
                    • 5.7.0

                    #11
                    I could place their code inside DFP but that would only call their DFP (they use the Doubleclick Pro Version) which would call their ad or adsense respectively.
                    This would lead to two more unnecessary Javascripts.

                    I had DFP codes in the headinclude before but was told it would speed up page rendering when placed after </header>
                    Will test it more

                    I have a high "Time To first Byte" though which irritates me.
                    Its around 900-1100ms
                    Michael Scheel
                    Facharzt für Kinder- und Jugendmedizin

                    Web: www.Kinderarzt-Cuxland.de
                    Facebook: Kinderarzt.Cuxland
                    Instagram: Kinderarzt.Cuxland

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...