Current time: 12-17-2017, 04:37 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Early flush and preload
01-18-2017, 03:41 AM
Post: #1
Early flush and preload
Hi!

Thanks for this greeeeeat tool that WPT is!

I've a question related to one of the tests: http://www.webpagetest.org/result/170117_YN_12FM/

Basically we have zero posibility to do a full page cache implementation (for business model, fresheness of the results), that is the first constrain, the second one is that in some countries (not the one of the example) the query to SOLR is extremely slow.
In order to improve performance we've implemented an early flush (chunked delivery) of a part of the <head> that includes a <link rel=preload> of the javascript resource (in mobile we embed the css) that is included in the footer with an defer tag (to avoid render block because is not critical for our business, only adds enhancement and lots of trackings Tongue )

In the attached screenshot the WPT test looks like the DNS lookup consumes like a lot of time.. and the position where the script does the preload is like not in the head but in the Chrome console (throttling a 'Good 3G' connection) the script is right where is meant to be.

so i've two questions: Is there any explanation for this behavior? and.. i'm doing something wrong or harmful for the site performance?

Thanks you so much people!

Darío


Attached File(s) Image(s)
   
Find all posts by this user
Quote this message in a reply
01-24-2017, 04:22 AM
Post: #2
RE: Early flush and preload
It looks like the Internet takes a fairly long route to get to your origin from EC2 Brazil: http://www.webpagetest.org/result/170123_WF_14R5/ (somewhere around 300ms) which gets added to the 3G connection profile. That is likely why the first request takes so long for each of the components before the content actually starts downloading.

That said, the long DNS for the script could have been an intermittent issue. I recommend always running at least 3 runs when you run a test just to be sure it isn't an outlier. That said, I saw similar behavior every time.

Chrome's built-in throttling doesn't work at the connection level and doesn't slow down DNS lookups or socket connections so it isn't going to be all that useful to compare to.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-01-2017, 04:14 AM
Post: #3
RE: Early flush and preload
Thanks a lot for the answer Patrick!

You were right, the server chosed for the first test was from BR and we serve the page from Barcelona, so.. yes a big round trip time there Smile (we're working to serve locally through Amanzon but that is going to take a while)

Since that original post i've been doing some improvements... i implement preconnect and preload (only Chrome supports them for now.. but that is better than nothing Smile, we already had dns-prefetch.

http://www.webpagetest.org/result/170131_MV_1352/ (this is Warsaw server serving from Barcelona)

The question is.. do you think can be harmful to do that much resource hinting? (all of them are used in some point in the current page) and..

http://www.webpagetest.org/video/compare...end=visual
(this is also serving from Barcelona), here you can see the no early flush vs early flush and how the resource hint interacts with them..

what do you think about early flush?, any contraindication there?

Thank you so much!

Darío
Find all posts by this user
Quote this message in a reply
02-01-2017, 06:19 PM
Post: #4
RE: Early flush and preload
(02-01-2017 04:14 AM)dario Wrote:  Thanks a lot for the answer Patrick!

You were right, the server chosed for the first test was from BR and we serve the page from Barcelona, so.. yes a big round trip time there Smile (we're working to serve locally through Amanzon but that is going to take a while)

Since that original post i've been doing some improvements... i implement preconnect and preload (only Chrome supports them for now.. but that is better than nothing Smile, we already had dns-prefetch.

http://www.webpagetest.org/result/170131_MV_1352/ (this is Warsaw server serving from Barcelona)

The question is.. do you think can be harmful to do that much resource hinting? (all of them are used in some point in the current page) and..

http://www.webpagetest.org/video/compare...end=visual
(this is also serving from Barcelona), here you can see the no early flush vs early flush and how the resource hint interacts with them..

what do you think about early flush?, any contraindication there?

Thank you so much!

Darío
I don't think the resource hinting will be significantly harmful. As for your second question, I'm not sureSmile
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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