Current time: 12-12-2019, 08:15 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimizing for first paint
04-19-2014, 09:35 AM (This post was last modified: 04-19-2014 09:44 AM by datadiggers.)
Post: #1
Optimizing for first paint
Hello,

I would like to get Your opinion on:
http://www.webpagetest.org/result/140418_TN_WHA/

Let's take Run 4 as an example for discussion:
http://www.webpagetest.org/result/140418...4/details/

HTML and CSS is completely loaded around 0.6 sec. All images have dimensions on them. There are no iframes, objects etc. JavaScript is deferred (actually the same behavior can be noticed when JS is disabled). Yet first paint consistently occurs around 1.4 sec. I've spent quite some time on it and I can't tell why is it happening. Do You have any ideas or tips how to analyze the issue? Or any tips or gotchas I should be aware of?

Note:
I don't see anything fancy going on Timeline in Chrome - only data is being downloaded.
Find all posts by this user
Quote this message in a reply
04-19-2014, 10:01 AM
Post: #2
RE: Optimizing for first paint
That's about as good as you're going to get without spriting a couple more icons and maybe switching some of the png's to jpgs. Even at that you're going to see minimal improvement. Might be worth lazy loading some of the images but again its going to be a miminal improvement over where you are now? 4 seconds is generally considered to be the break point for a good websites and your in the one second range.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-19-2014, 11:45 AM (This post was last modified: 04-19-2014 11:49 AM by Anton Chigurh.)
Post: #3
RE: Optimizing for first paint
Hey not bad at all. In addition to what Chris above is saying, I would also see if I can do without the custom font files. These represent 3.8% of your page load. Do you really need them? Most browsers aren't going to display them anyway, and they still get downloaded regardless.

Also, there are some images you can fix up still and really save bandwidth on. This image for starters - the third option you see there it's 43% smaller in file size than what you're using, saving 23kb.

Here's your entire image breakdown and you can see, there's still some trimming to be had on several of the images. Just click where you see "Analyze JPEG" and WPT will make your optimized images for you.

You've done a nice job with this it's refreshing to see.
Find all posts by this user
Quote this message in a reply
04-20-2014, 03:20 AM
Post: #4
RE: Optimizing for first paint
Thanks for tipsSmile However I really just wanted to discuss why browser is waiting so long to do first paint and how it can be optimized. I have a feeling that there is still room for an improvement, even without 'over optimizing' things and making them overly complicated. I would like to cut another 300-400 ms from first paint event.

Fonts - they are loaded dynamically so that's not that big of an issue, but yes, I would like to get rid of them too.
CSS sprites - I leave them for the end of optimization process. They are maintenance hell in my opinion, especially on e-commerce site where sprites may include images from several third party modules.
Images - true, some images could be better optimized. For now however I rely on lossless compression . The heaviest image is noticeably different at 85% quality setting.
Find all posts by this user
Quote this message in a reply
04-20-2014, 03:24 AM (This post was last modified: 04-20-2014 03:37 AM by Anton Chigurh.)
Post: #5
RE: Optimizing for first paint
(04-20-2014 03:20 AM)datadiggers Wrote:  Thanks for tipsSmile However I really just wanted to discuss why browser is waiting so long to do first paint and how it can be optimized. I have a feeling that there is still room for an improvement, even without 'over optimizing' things and making them overly complicated. I would like to cut another 300-400 ms from first paint event.
Trying the basic optimization techniques posted thus far might just improve that, and can certainly do no harm at all. It's just a little bit of extra effort.

There is NO such thing as "over optimizing." Taking 200kb or more of unnecessary bandwidth off each pageload is the payoff, improvement of first paint if it results, is a bonus.

That's 200kb-plus each pageload, times what? A thousand? A million, over time? That's alot of bandwidth and alot of saved load time.

Trim what little unnecessary bloat you have, then see what happens to first paint time.

(04-20-2014 03:20 AM)datadiggers Wrote:  Fonts - they are loaded dynamically so that's not that big of an issue
That's not relevant, they are still representing over 3 percent of your bandwidth, 3 percent of your kb load, and add time. And 3 percent is right at what you're looking for, in improvement of first paint time.
Find all posts by this user
Quote this message in a reply
04-22-2014, 03:08 PM (This post was last modified: 04-22-2014 03:15 PM by grupoalianzaempresarial.)
Post: #6
RE: Optimizing for first paint
Optimize code, look at this:

http://www.tususcripcion.com

it's not the only way, but help a lot.
Find all posts by this user
Quote this message in a reply
04-23-2014, 02:54 PM
Post: #7
RE: Optimizing for first paint
datadiggers , Hi there ))
What to start from...hm. Don't get why no one pointed that site's JS as slow as hell.

That UX is very poor . Everything feels slow (But visual feedback on hoverover - mobile like behaviour)))


1 - Don't build lay out with help of JS ( that is what you do for - Green buy buttons , Header, nav menu ) I have a believing that rendering does not start since it waits for JS loaded http://screencast.com/t/rJ21qjmR

2 - Fonts should not be deferred. Since it visually very obvious how unstyled fonts become styled )

3 - all of js animations should be faster , remove time out , if exists . IT feels slow when Hover over navigation menu or products - Now it is noticeably slow

Perfomace:
1 - CSS http://screencast.com/t/8r7YnLpS
2 - image subdomain ?
3 -



bugs: http://screencast.com/t/lWtSDh0NpJlK, http://screencast.com/t/o1VH4ZjRN9O and so on


So my verdict : Get a QA first. Get your UX speed better
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)