Current time: 11-19-2019, 10:19 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Still slow after heavy optimization!
02-22-2016, 07:32 PM
Post: #1
Still slow after heavy optimization!
I have built a static site generator service and now I am trying to get it faster. I have built it in Javascript. I managed to concatenate and minify all angular.js scripts except for one. I also have minified all css and tried to make all images smaller.

http://www.webpagetest.org/result/160222...1/details/

Still it looks as if the main problem is the external javascript CDN which has up to 5 sec DNS lookup time and has a size of aprox 2 Mb. I use Cloudflare and try to cache all on the first page.

What would the best aproach be? Collect all external scripts and concatenate them into one file and server them from my server?

Regards,

Göran
Find all posts by this user
Quote this message in a reply
02-23-2016, 05:04 AM
Post: #2
RE: Still slow after heavy optimization!
The consistency of the DNS time across multiple domains suggests to me that this is abnormal. Could you try rerunning the test from another location?
Visit this user's website Find all posts by this user
Quote this message in a reply
02-23-2016, 07:59 AM (This post was last modified: 02-23-2016 08:42 AM by appernetic.)
Post: #3
RE: Still slow after heavy optimization!
Better DNS lookup this time, form Dulles:
http://www.webpagetest.org/result/160222..._byte_time

Still the same from Amsterdam: http://www.webpagetest.org/result/160222...1/details/

London: http://www.webpagetest.org/result/160222...1/details/
Find all posts by this user
Quote this message in a reply
02-24-2016, 01:39 AM
Post: #4
RE: Still slow after heavy optimization!
The long DNS times are probably caused by the browser being busy executing some js (the CPU is pretty much pegged). Try turning on a dev tools timeline capture in teh chrome tab of the advanced settings which will tell you what JS is running and how long it is taking.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-24-2016, 02:49 AM
Post: #5
RE: Still slow after heavy optimization!
Ah, ok. Yes I have lots of javascript. I have managed to minify and combine my own scripts so now there is only 58.

Is there a way to combine external javascript sources from CDN?
Find all posts by this user
Quote this message in a reply
02-24-2016, 04:53 AM
Post: #6
RE: Still slow after heavy optimization!
It's not so much the number of files but the actual execution of the code in them. Combining/merging won't change that. A dev tools timeline will help point out the really painful ones in case there's a pathological problem.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-24-2016, 06:53 AM (This post was last modified: 02-24-2016 07:01 AM by appernetic.)
Post: #7
RE: Still slow after heavy optimization!
Ok, not much I can do if it is a problem with an external script that my service is dependent on. If it's really bad I will have to investigate it thou.

Thanks for your insight!

I have a dude down in Cambodia on a slow connection with a Android smartphone which managed to use the service. So it appears to work.
Find all posts by this user
Quote this message in a reply
02-26-2016, 02:46 PM
Post: #8
RE: Still slow after heavy optimization!
(02-24-2016 06:53 AM)appernetic Wrote:  Ok, not much I can do if it is a problem with an external script that my service is dependent on. If it's really bad I will have to investigate it thou.

Thanks for your insight!

I have a dude down in Cambodia on a slow connection with a Android smartphone which managed to use the service. So it appears to work.

I really think that you should at least download the external javascripts files (for example angularjs modules) and use a grunt job to combine/bundle all of them in one. The formation that I'm using is using bower for maintaining external javascript dependencies and grunt to combine all of them into one js file. It will greatly improve your website's performance
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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