• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

Site Performance - optimization workshop thread

Status
Not open for further replies.
Hey everyone, I have been meaning to post in here for awhile. I believe my site could use a bit of improvement in terms of page load especially the cms page upon first load.

I do have the tweak added to htaccess but the biggest issue is with the cms. The main reason I want to address this is due to Chrome loading very badly. Our site is very, very image and video heavy. I do have nginx enabled for static images but this could probably also use some tweaking.

The site is

PHP:
http://musclemecca.com


Thanks!
 
Hey everyone, I have been meaning to post in here for awhile. I believe my site could use a bit of improvement in terms of page load especially the cms page upon first load.

I do have the tweak added to htaccess but the biggest issue is with the cms. The main reason I want to address this is due to Chrome loading very badly. Our site is very, very image and video heavy. I do have nginx enabled for static images but this could probably also use some tweaking.

The site is

PHP:
http://musclemecca.com


Thanks!
Save over 50kb here, using third image you see. Save it, rename it to match what's on the server, and upload to overwrite. Save 12 more KB here, same thing. Take third image and use it. And here's another 23kb of savings, same deal.

You're calling this one twice for some reason. Use third optimized image here as well.

There's 100kb right there already, you can easily trim off without losing any visible quality. Entire image breakdown here.

In the waterfall detail we can see you have a 404 error on your tapatalk js.

Still getting a F grade for leverage browser caching of static content. These items are the fails. Most all of those should have been addressed by the .htaccess code we give in another thread. Either .htaccess isn't uploaded in the right place, or possibly not named right (lots of people forget the dot at the beginning) or, something else is going on.

I did this test using a chrome browser on a cable connection out of Miami FL. The 6 second full load time really isn't terrible for the 1.3MB of page you have there.
 
Thanks Max! Lots to think about there!

.htaccess is correct as far as I know but take a look if you don't mind - Here it is-

PHP:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www.musclemecca\.com$ [NC]
RewriteRule ^(.*)$ http://musclemecca.com/$1 [L,R=301]

#RedirectMatch 301 ^/content/(.*)$ http://musclemecca.com/content/$1

# new static rulers
Redirect 301 /270/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /271/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /277/ http://musclemecca.com/forumdisplay.php/277-Legendary-Threads

Redirect 301 /f226/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f226/2012-amateur-olympia-guaratees-spot-2013-mr-o-220736/ http://musclemecca.com/showthread.php/220736-2012-Amateur-Olympia!-Guaratees-spot-at-the-2013-Mr-O-!!!!
Redirect 301 /f226/antoine-vaillant-updates-official-thread-219458/index11.html http://musclemecca.com/showthread.php/219458-Antoine-Vaillant-%28Updates%29-Official-Thread/page11
Redirect 301 /f226/antoine-vaillant-updates-official-thread-219458/index2.html http://musclemecca.com/showthread.php/219458-Antoine-Vaillant-(Updates)-Official-Thread
Redirect 301 /f226/arnold-schwarzenegger-training-recently-219595/ http://musclemecca.com/showthread.php/219595-Arnold-Schwarzenegger-Training-Recently!?highlight=arnold-schwarzenegger-training
Redirect 301 /f226/article-re-ronnie-coleman-updates-official-thread-220863/ http://musclemecca.com/content.php?r=186-Re-Ronnie-Coleman-(Updates)-Official-Thread
Redirect 301 /f226/article-re-ronnie-coleman-updates-official-thread-220863/ http://musclemecca.com/showthread.php/221015-Ronnie-Coleman-(Updates)-Official-Thread
Redirect 301 /f226/kai-greene-arnold-preview-184695/ http://musclemecca.com/showthread.php/184695-Kai-Greene-%28Arnold-Preview%29?highlight=kai-greene-arnold-preview
Redirect 301 /f226/mark-alvisi-dragon-training-series-episode-4-arms-workout-213074/ http://musclemecca.com/showthread.php/213074-Mark-Alvisi-Dragon-Training-Series-Episode-4-(Arms-Workout)
Redirect 301 /f226/new-md-october-2008-a-197679/ http://musclemecca.com/showthread.php/197679-NEW-MD-OCTOBER-2008
Redirect 301 /f226/ronnie-coleman-207389/ http://musclemecca.com/forumdisplay.php/307-Ronnie-Coleman
Redirect 301 /f265/ http://musclemecca.com/forumdisplay.php/265-Movies-Games-TV-and-Music
Redirect 301 /f265/toy-story-3-movie-trailer-213280/ http://musclemecca.com/showthread.php/213280-Toy-Story-3-movie-trailer
Redirect 301 /f267/ http://musclemecca.com/forumdisplay.php/267-The-2008-MEMBER-OF-THE-YEAR
Redirect 301 /f270/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f271/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f277/ http://musclemecca.com/forumdisplay.php/277-Legendary-Threads
Redirect 301 /f286/ http://musclemecca.com/forumdisplay.php/286-Androgenetx-com
Redirect 301 /f289/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f290/ http://musclemecca.com/forumdisplay.php/290-CEMproducts-com
Redirect 301 /f293/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f298/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f299/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f300/ http://musclemecca.com/forumdisplay.php/229-MuscleMecca-Feedback
Redirect 301 /f301/ http://musclemecca.com/forumdisplay.php/301-Diet-Nutrition-and-Enhancement-Forum
Redirect 301 /f302/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /f305/ http://musclemecca.com/forumdisplay.php/305-Bodybuilder-Pro-List
Redirect 301 /f306/ http://musclemecca.com/forumdisplay.php/306-Arnold-Schwarzenegger
Redirect 301 /f307/ http://musclemecca.com/forumdisplay.php/307-Ronnie-Coleman
Redirect 301 /f308/ http://musclemecca.com/forumdisplay.php/308-Phil-Heath
Redirect 301 /f321/ http://musclemecca.com/forumdisplay.php/321-John-Grimek
Redirect 301 /f322/ http://musclemecca.com/forumdisplay.php/322-Sergio-Oliva
Redirect 301 /f328/ http://musclemecca.com/forumdisplay.php/328-Shawn-Roden
Redirect 301 /f329/ http://musclemecca.com/forumdisplay.php/329-Lionel-Beyeke
Redirect 301 /f352/ http://musclemecca.com/forumdisplay.php/325-Bob-Paris

Redirect 301 /arnold-classic-298/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters
Redirect 301 /arnold-classic-298/ http://musclemecca.com/forumdisplay.php/306-Arnold-Schwarzenegger
Redirect 301 /bodybuilding-pictures-270/ http://musclemecca.com/albumall.php
Redirect 301 /bodybuilding-videos-231/ http://musclemecca.com/forumdisplay.php/340-Muscle-Video
Redirect 301 /forum/ http://musclemecca.com/forum.php
Redirect 301 /forum/index.php http://musclemecca.com/forum.php
Redirect 301 /mr-olympia-297/ http://musclemecca.com/forumdisplay.php/226-MuscleMecca-HeadQuarters

## Tags
RedirectMatch 301 ^/tags/([A-Za-z0-9-]+)/$ http://musclemecca.com/tags.php?tag=$1

## Members
RedirectMatch 301 ^/members/(.*)$ http://musclemecca.com/member.php/$1

##Treads
RedirectMatch 301 ^/f([0-9]+)/([A-Za-z0-9-]+)-([0-9-]+)/index([0-9-]+)\.html$ http://musclemecca.com/showthread.php/$3-$2/page$4
RedirectMatch 301 ^/f([0-9]+)/([A-Za-z0-9-]+)-([0-9-]+)/$ http://musclemecca.com/showthread.php/$3-$2

RedirectMatch 301 ^/([0-9-]+)-post([0-9-]+)\.html$ http://musclemecca.com/showthread.php?p=$1
RedirectMatch 301 ^/threads/(.*)$ http://musclemecca.com/showthread.php/$1

##SiteMap
RedirectMatch 301 ^/sitemap/f-([a-z0-9-]+)\.html$ http://musclemecca.com/archive/index.php/f-$1.html

RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9-]+)/([A-Za-z0-9-_]+)-([0-9-]+)/index([0-9-]+)\.html$ http://musclemecca.com/showthread.php/$4-$3/page$5
RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9-]+)/([A-Za-z0-9-_]+)-([0-9-]+)/index([0-9-]+)$ http://musclemecca.com/showthread.php/$4-$3/page$5
RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9-]+)/([A-Za-z0-9-_]+)-([0-9-]+)/(.*)$ http://musclemecca.com/showthread.php/$4-$3
RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9-]+)/([A-Za-z0-9-_]+)-([0-9-]+)/$ http://musclemecca.com/showthread.php/$4-$3

## Forums
RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9-]+)/$ http://musclemecca.com/forumdisplay.php/$2-$1

## Expires
<ifModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault "access plus 1 seconds"
        ExpiresByType text/html "access plus 1 seconds"
        ExpiresByType image/gif "access plus 3456000 seconds"
        ExpiresByType image/jpeg "access plus 3456000 seconds"
        ExpiresByType image/png "access plus 3456000 seconds"
        ExpiresByType text/css "access plus 3456000 seconds"
        ExpiresByType text/javascript "access plus 3456000 seconds"
        ExpiresByType application/javascript "access plus 3456000 seconds"
        ExpiresByType application/x-javascript "access plus 3456000 seconds"
</ifModule>

## Compression
<ifmodule mod_headers.c>
        <ifmodule mod_deflate.c>
                AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
                BrowserMatch ^Mozilla/4 gzip-only-text/html
                BrowserMatch ^Mozilla/4\.0[678] no-gzip
                BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        </ifmodule>
</ifmodule>

## Rewrites
<ifmodule mod_rewrite.c>
        RewriteEngine on
        Options +FollowSymlinks

        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]

        # Media Library
        ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
        ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
        ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
        ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
        ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
        ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
        ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
        ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
        ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
        ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
        ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
        ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
        ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
        ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
        ReWriteRule ^media/browse.* media.php?do=browse [QSA]
        ReWriteRule ^media/search.* media.php?do=search [QSA]
        ReWriteRule ^media/random.* media.php?do=random [QSA]
        ReWriteRule ^media/submit.* media.php?do=submit [QSA]
        ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
        ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
        ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
        ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
        ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
        ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
        ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
        ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
        ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
        ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]

        # Media Library from Video Directory
        RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
        RewriteRule ^video\.php$ media.php?do=details&mid=%1
        RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
        RewriteRule ^video\.php$ media.php?do=category&cid=%1
        RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
        RewriteRule ^video\.php$ media.php?do=user&uid=%1
        RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
        RewriteRule ^video\.php$ media.php?do=tag&tid=%1
        ReWriteRule ^video\.php$ media.php

</ifmodule>

<IfModule mod_headers.c>
        <FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf|tif|tiff)$">
                Header set Last-Modified "Mon, 15 Feb 2013 00:00:00 GMT"
        </FilesMatch>
</IfModule>


ErrorDocument 400 /pages.php?pageid=8
ErrorDocument 401 /pages.php?pageid=8
ErrorDocument 403 /pages.php?pageid=8
ErrorDocument 404 /pages.php?pageid=8
ErrorDocument 500 /pages.php?pageid=8

I am definitely going to tweak some of the larger images to be smaller but the majority of the images come from the posts. I think the best solution here would be to lower the number of posts per page, threads per page but I do not want those urls to change. nginx does not seem to be working either which explains the f grade on static images..

Thanks again Max! I really appreciate the help,
Rich
 
Thanks Max! Lots to think about there!

.htaccess is correct as far as I know but take a look if you don't mind
I really don't see the comprehensive code we gave in Ozzy's post on the topic. Also, is .htaccess installed on root? Or just forum root?
I am definitely going to tweak some of the larger images to be smaller but the majority of the images come from the posts. I think the best solution here would be to lower the number of posts per page, threads per page but I do not want those urls to change. nginx does not seem to be working either which explains the f grade on static images..

Thanks again Max! I really appreciate the help,
Rich
All we can do is run the tests and follow the instructions we get from there... The images I linked you too do need to be uploaded in replacement of the ones that are there. The test was run on your CMS page and alot of the offending items were banner ads that are 1st party, not posts.
 
Your right about the htaccess not having some of the file types. I am going to update that now.

I have to turn ccs caching back on once I clear the cache directory. I will try the test again later today once I finish some of these tweaks.

Big help man, Thanks
 
Thanks,

The site is already loading faster though I think the problem with the cms page is the slider widget.

I also cannot figure out why the tapatalk.js is showing an error. I just updated this and see now issues in any browsers, only the speed test.

I know there are some other things too that cause slower page loads such as the twitter widget. All in all a big improvement and I haven't finished yet either. :)
 
I just started using css caching again and for some reason upon doing this I get a light colored border showing up around certain sections.

Keep in mind I started with a totally empty cache here so it is isn't pulling from an older version. Any idea as to why this would happen with css caching enabled?
 
I'm about to pull my hair off. I get some better grades now while others went worse. All in all I believe I have shaved a second or two off the page load for first time loads. Images are still not compressing correctly though.
 
Status
Not open for further replies.
Back
Top