Very slow first load time problems

Permalink
Hi,

I recently discovered the loading times for my homepage (www.grafoman.be) were reaaaalllyyy long..
Ran a test and this is the result (see screenshot)..
So you can see the first load time is 18 seconds!
Login in the dashboard takes forever.

Running 5.7 with theme Long Story Short.

I can't find any errors in my code..

Any help would be appreciated.

1 Attachment

View Replies: View Best Answer
JohntheFish replied on at Permalink Reply
JohntheFish
grafoman.be came up in 2.17s for me.

On your screenshot, it looks like the main issue is building the html rather than any assets.

Load times are often different between logged in and not logged in - when logged in you need a lot of dashboard stuff.

Is your database on the same server? If its separate, the comms overhead can cause long load. Is it shared hosting? That can often depend on who you are sharing with.

As an aside, you do have some duplicated assets like fontawesome.
Steevb replied on at Permalink Best Answer Reply 3 Attachments
Steevb
You have 91 requests for images at a total of over 7MB, not good.

The images in your portfolio section need major optimisation.

First image 242KB (1B.png), I got it down to 33KB.

Second image 279KB (4B.png), I got it down to 33KB.

Third image 397KB (2B.png), I got it down to 37KB.

You will need to optimise ALL images and add ‘max-age and expires’ to your .htaccess file for all files.

See my attached versions of your images.

For better breakdown and help use:http://www.webpagetest.org/
Steevb replied on at Permalink Reply
Steevb
Forgot to mention first load time for me was about 18 seconds, not good!
Steevb replied on at Permalink Reply
Steevb
Bit more from me.

You might be using 'Photoshop", I use 'Fireworks'. However if you want a great alternative, try using PhotoScape.
It's free for both Mac and Windows: http://photoscape.org
MrKDilkington replied on at Permalink Reply
MrKDilkington
@grafoman

Part of the problem is you are testing your site against a server in Dallas, Texas. Unless you are using a CDN, or similar, you will want to test your site against an EU server.

If you test your site from Amsterdam, Netherlands, it loads in 4.08 seconds.
Steevb replied on at Permalink Reply
Steevb
No disrespect MrK, as my previous post, the images are a big problem. They need optimising as dose all content.
lwduk replied on at Permalink Reply
The images are far too large as mentioned. Why are you using PNG when JPEG will get better compression. Also if it's 5.7 you are using have thumbnails be configured correctly within the dashboard?
This will help also to reduce the image size depending on the screen size.
grafoman replied on at Permalink Reply
Okay, so i managed to bring the size of the images down quite a bit! Thanks for that suggestion.
However when i'm running speed tests, i still have issues with the first byte time and the number of requests (currently at 136!).
Anything i can do about this?
Steevb replied on at Permalink Reply
Steevb
You still need to compress images on your server with the .htaccess file.

You could also try a lazyload script.

I use: https://github.com/aFarkas/lazysizes...
grafoman replied on at Permalink Reply
Okay so i added this to my htaccess file:

# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>


As for the lazysizes script. If I understand it correctly i have to add the class 'lazyload' to each image? Seems like a hassle?


EDIT: i used the code from user studio108 (see his link!)
Steevb replied on at Permalink Reply
Steevb
You can add the lazysizes class to anything, so if images are a div, lazysize the div.

Examples and help: http://afarkas.github.io/lazysizes/#examples...
studio108 replied on at Permalink Reply
studio108
Now it is a good time to look at this article which is the next step I personally would take.

http://iconicmedia.net/blog/how-optimize-your-concrete5-website...

Regards
lwduk
grafoman replied on at Permalink Reply
Thanks for the link! I used the code in the htaccess file instead of my previous answer
grafoman replied on at Permalink Reply 1 Attachment
So, all these solutions are pretty good to increase the overall speed on your site. But what about the First Byte Time? Check the screenshot to see what i mean.. It's still horribly slow.
JohntheFish replied on at Permalink Reply
JohntheFish
Going back to my original reply, ttfb for me right now is 1.74s. Total load (all files) 5.4s, but the page was rendered and viewable before that time. Browser cache disabled. I am obviously NOT logged in. So I am seeing the site like a first time visitor would.
grafoman replied on at Permalink Reply 1 Attachment
So no easy way to improve this?
Edit: check the screenshot for another example..