Loading is slower in active mode than development mode?


#1

I have a website hosted by AWS EC2 Oregon and managed by CloudFlare. I let my teammate test the loading time (in France) of the following files while disable cache in Google Dev Tools.

http://www.matrixlead.com/monaco-editor/min/vs/editor/editor.main.js
http://www.matrixlead.com/monaco-editor/min/vs/language/typescript/src/worker.js
http://www.matrixlead.com/monaco-editor/min/vs/language/typescript/lib/typescriptServices.js
http://www.matrixlead.com/editor.js

His loading time is obviously longer in active mode than development mode, which is very odd.

Does anyone know what may be the reason?


#2

I’m getting a value consistent with the size and the speed of my connection (18 Mbps), so the ~1MB file when gzipped downloads in about half a second and they are hitting Cloudflare’s cache in Frankfurt. What download times does he get?


#3

“half a second”? he (in France) used more than 1min for that biggest file, and I (in China) used 30 seconds for that file…


#4

Nope, I am seeing at most 550ms, with some files under 200ms (as in milliseconds, 0.2 seconds).

What connection do you have? Do you have a UNIX (Linux/macOS) machine we can try something on the terminal?


#6

I have a macOS, please let me know what to test…

Additionally, how did you know you are hitting “Frankfurt”?


#7

From the headers, we are gonna check that now.

First of all let’s try and understand what distance is CF is from you, so (in the terminal window):

ping www.matrixlead.com
traceroute www.matrixlead.com

Then copy me the results of this website in your browser: http://www.matrixlead.com/cdn-cgi/trace

And finally do (changing the URL to all the above, maybe include also the homepage, so without the editor.js part:

curl -I http://www.matrixlead.com/editor.js

#8
PING www.matrixlead.com (104.28.19.49): 56 data bytes
64 bytes from 104.28.19.49: icmp_seq=0 ttl=53 time=203.347 ms
64 bytes from 104.28.19.49: icmp_seq=1 ttl=53 time=207.650 ms
64 bytes from 104.28.19.49: icmp_seq=2 ttl=53 time=202.888 ms
64 bytes from 104.28.19.49: icmp_seq=3 ttl=53 time=206.383 ms
64 bytes from 104.28.19.49: icmp_seq=4 ttl=53 time=205.182 ms
... ...

traceroute: Warning: www.matrixlead.com has multiple addresses; using 104.28.19.49
traceroute to www.matrixlead.com (104.28.19.49), 64 hops max, 52 byte packets
 1  192.168.1.1 (192.168.1.1)  16.707 ms  2.619 ms  0.646 ms
 2  175.169.0.1 (175.169.0.1)  24.297 ms  2.368 ms  4.708 ms
 3  218.25.3.73 (218.25.3.73)  4.945 ms  2.831 ms  3.061 ms
 4  113.230.180.81 (113.230.180.81)  21.933 ms
    113.230.184.201 (113.230.184.201)  51.914 ms
    113.230.177.241 (113.230.177.241)  57.803 ms
 5  219.158.115.137 (219.158.115.137)  54.949 ms  66.612 ms  48.062 ms
 6  219.158.103.218 (219.158.103.218)  68.586 ms  73.417 ms  78.176 ms
 7  219.158.96.209 (219.158.96.209)  57.277 ms
    219.158.103.30 (219.158.103.30)  53.947 ms
    219.158.103.34 (219.158.103.34)  57.827 ms
 8  219.158.96.34 (219.158.96.34)  219.456 ms
    219.158.98.62 (219.158.98.62)  211.860 ms
    219.158.96.34 (219.158.96.34)  214.446 ms
 ... ...

fl=12f230
h=www.matrixlead.com
ip=175.169.27.177
ts=1527504966.642
visit_scheme=http
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
colo=LAX
spdy=off
http=http/1.1
loc=CN

$ curl -I http://www.matrixlead.com/editor.js
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 10:56:43 GMT
Content-Type: application/javascript
Connection: keep-alive
Set-Cookie: __cfduid=d6777f8f5d281a43f01cdc719a416adf21527505003; expires=Tue, 28-May-19 10:56:43 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Sun, 27 May 2018 12:11:49 GMT
ETag: W/"d12eb8e3b3f5d31:0"
Vary: Accept-Encoding
X-Powered-By: ASP.NET
CF-Cache-Status: HIT
Expires: Mon, 28 May 2018 14:56:43 GMT
Cache-Control: public, max-age=14400
Server: cloudflare
CF-RAY: 4220323d44d3998b-LAX

$ curl -I http://www.matrixlead.com
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 10:57:38 GMT
Content-Type: text/html
Connection: keep-alive
Set-Cookie: __cfduid=d5369ac039fa0b06dfc01f423d97d693f1527505058; expires=Tue, 28-May-19 10:57:38 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Sun, 27 May 2018 12:01:44 GMT
Vary: Accept-Encoding
X-Powered-By: ASP.NET
Server: cloudflare
CF-RAY: 42203398a32a22c4-LAX

$ curl -I http://www.matrixlead.com/monaco-editor/min/vs/editor/editor.main.js
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 10:58:33 GMT
Content-Type: application/javascript
Connection: keep-alive
Set-Cookie: __cfduid=d4fc8aa1cd1d4ad3fce1c648344db2d3e1527505113; expires=Tue, 28-May-19 10:58:33 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Mon, 03 Jul 2017 13:56:49 GMT
ETag: W/"80662e374f4d21:0"
Vary: Accept-Encoding
X-Powered-By: ASP.NET
CF-Cache-Status: HIT
Expires: Mon, 28 May 2018 14:58:33 GMT
Cache-Control: public, max-age=14400
Server: cloudflare
CF-RAY: 422034ed72822306-LAX

I am in China, do you see something odd?


#9

Well being in China certainly explain a lot the high 200ms ping. Would you mind also trying a Speedtest towards Los Angeles (you are connecting there, since in the Free plan there is no China network). Otherwise everything seems as expected, the cache is hit…


#10

I am in france, and do the same test as you suggested. Here is the results.
PING www.matrixlead.com (104.28.19.49): 56 data bytes
64 bytes from 104.28.19.49: icmp_seq=0 ttl=59 time=23.869 ms
64 bytes from 104.28.19.49: icmp_seq=1 ttl=59 time=22.779 ms
64 bytes from 104.28.19.49: icmp_seq=2 ttl=59 time=23.189 ms
64 bytes from 104.28.19.49: icmp_seq=3 ttl=59 time=20.717 ms
64 bytes from 104.28.19.49: icmp_seq=4 ttl=59 time=20.346 ms
… …

traceroute: Warning: www.matrixlead.com has multiple addresses; using 104.28.19.49
traceroute to www.matrixlead.com (104.28.19.49), 64 hops max, 52 byte packets
 1  bbox.lan (192.168.1.254)  3.230 ms  1.994 ms  3.967 ms
 2  lcs07-lyo-176-188-192-2.sfr.lns.abo.bbox.fr (176.188.192.2)  12.213 ms  12.348 ms  11.457 ms
 3  be23.cbr01-ntr.net.bbox.fr (212.194.171.40)  24.098 ms  23.435 ms  19.780 ms
 4  * la13.rpt02-ix2.net.bbox.fr (212.194.171.90)  20.126 ms  20.200 ms
 5  cloudflare.par.franceix.net (37.49.237.49)  20.116 ms  20.186 ms  21.382 ms
 6  104.28.19.49 (104.28.19.49)  24.994 ms  20.826 ms  19.764 ms

fl=19f166
h=www.matrixlead.com
ip=176.132.174.174
ts=1527508166.772
visit_scheme=http
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15
colo=CDG
spdy=off
http=http/1.1
loc=FR

curl -I http://www.matrixlead.com/editor.js
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 11:50:06 GMT
Content-Type: application/javascript
Connection: keep-alive
Set-Cookie: __cfduid=d009eeb143b0f3b3c0ca110a97f39e9781527508206; expires=Tue, 28-May-19 11:50:06 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Sun, 27 May 2018 12:11:49 GMT
ETag: W/"d12eb8e3b3f5d31:0"
Vary: Accept-Encoding
X-Powered-By: ASP.NET
CF-Cache-Status: HIT
Expires: Mon, 28 May 2018 15:50:06 GMT
Cache-Control: public, max-age=14400
Server: cloudflare
CF-RAY: 4220807064826950-CDG

$ curl -I http://www.matrixlead.com
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 11:50:50 GMT
Content-Type: text/html
Connection: keep-alive
Set-Cookie: __cfduid=d56cf18653d6ccac00da66294b7d4f2be1527508249; expires=Tue, 28-May-19 11:50:49 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Sun, 27 May 2018 12:01:44 GMT
Vary: Accept-Encoding
X-Powered-By: ASP.NET
Server: cloudflare
CF-RAY: 42208180c2756950-CDG

$ curl -I http://www.matrixlead.com/monaco-editor/min/vs/editor/editor.main.js
HTTP/1.1 200 OK
Date: Mon, 28 May 2018 11:51:25 GMT
Content-Type: application/javascript
Connection: keep-alive
Set-Cookie: __cfduid=dd133acf06d5c2aed0bf927bd4c57dfa31527508284; expires=Tue, 28-May-19 11:51:24 GMT; path=/; domain=.matrixlead.com; HttpOnly
Last-Modified: Mon, 03 Jul 2017 13:56:49 GMT
ETag: W/"80662e374f4d21:0"
Vary: Accept-Encoding
X-Powered-By: ASP.NET
CF-Cache-Status: REVALIDATED
Expires: Mon, 28 May 2018 15:51:25 GMT
Cache-Control: public, max-age=14400
Server: cloudflare
CF-RAY: 4220825d02ca68d2-CDG

And the loading information for this link: http://www.matrixlead.com/editor.js


Do you see something odd?


#11

Could you take a look at the test of my teammate ljhecn?


#12

Of course! Try doing a speedtest as well though, it would help pinpoint the issue. Make him do it as well towards where he connects.


#14

Could you please explain more about “speedtest”? Which tool should we use?


#15

I would use this http://www.speedtest.net/, if it is not blocked by China.

Select a server in Los Angeles (it could probably auto select it, but it’s not a given)


#16

You connection seems better, though, those 40+ seconds are incredibly high. Try doing a Speedtest like @chengtie using Paris.


#17

Here is mine: http://www.speedtest.net/result/7346628892


#18

That’s a pretty good result, actually. Have you tried clearing your cache/cookies + changing browser? It shouldn’t help, but never say never.

Gonna try and call for some additional advice here from @sdayman, @MarkMeyer and @cscharff. With that connection (actually faster than my current one) it seems impossible it would take 40+ second to download a file from cache, especially if under 1MB!


#19

Here is mine in france: http://www.speedtest.net/result/7346639707


#20

You should select Paris, Los Angeles is not useful in your case.


#21

Here is the result by selecting Paris. http://www.speedtest.net/result/7346648002


#22

You speed allows for some more time to download, not surely 40 seconds though. A couple of seconds probably.

Really unsure about this one.