Which particular response are you measuring? Make you sure you don't use DO dns unless your provider is not so good. It slows response time.
Slow response time
A new, fairly untouched Spark 3 installation is giving me average response times of anywhere between 800ms to a full second. That's on a $20 p/month server with Digital Ocean.
I'm also caching routes & config.
Is this normal?
Just curious, when did a second start making a difference? Even UPS site tracking, sometimes screen whips right up, sometimes takes a little longer. Really, you have heard of slower times depending on web traffic, right? Every request / response isn't going to happen in .00000001 second.
@ejdelmonico Not sure what you mean. I can see from debugbar that Laravel is taking on average 800-1000ms to load.
@jlrdw 1 second response time is awful! There's absolutely no way it should be taking that long to load.
Also, that's me with only me testing the website, NO other traffic. I dread to think how slow it would be if you actually had some decent traffic.
Well, measuring that in your browser is not the way to do it. Plugins, etc will affect the response time. Pingdom, webpagetest etc is where you should test for abnormal response times. There are so many factors that affect the times as @jlrdw mentioned.
@ejdelmonico Trust me, I'm well aware that there are many factors that can affect response time. As I said before, I can see from debugbar that it is clearly slow.
I was wondering if this is the same experience as others.
I can't reproduce those times because I am using Cloudflare for both of my Spark sites.
@ejdelmonico Okay, well that's promising to hear. I'll keep digging to find out what is going on, and report back with what I find. Are your sites running the latest version of Spark?
Yes, I am using a DO server from SFO region for each one and couple that with all the goodies of paid cloudflare account. They handle a good load and the dynamic data is not slow..so good for me.
File downloads. Each CSS, js, image etc. adds a lot. Setting headers properly also is huge. Even if you have said files cached be default it checks for changes every request. That needs to not happen.
Did you trace route the IP? I've connected from la to Chicago via Virginia. Packets take a might longer to travel that far.
Are you running clockwork on your dev to ensure efficient queries or just default select * dumping columns you don't need.
Are your CSS and js files minified and concatened into minimum amount of files, or 10 CSS files, 20 js and 40 images? If images are the like 1/2 gb each or cropped/resized to the smallest size they can be?
Running google analytics or new relic? They tell you response time and what actually is talking so long.
How is the time via IP versus domain URL? If IP is significantly less your dns are jacked up.
Are you running php 7? MySQL via localhost or remote. If it's localhost be sure it's not hitting IP address instead. That will cause a huge slowdown as php will go out to the internet, find the IP and come back to your server for data request.
What OS and webserver are you running? Are the configured properly or redirecting all over the place and back.
@Dan even on this very forum, I randomly picked one, clicked it and counted 1001, 1 It took a little over the first 1001. I clicked https://laracasts.com/discuss/channels/requests/i-need-help-with-jquery-autocomplete-from-database Everyone keeps adding more and more css, js, etc, of course in testing it will take a little to load. Try same with just a basic html page, super fast. Rule = more junk loading, longer it will take to load.
@jlrdw I think you've missed my point. I'm not talking about how long it takes to load the page (including CSS, JS etc.). I'm talking about the response time of the page. How long the server is taking to crunch the PHP in simple terms.
I run a hugely successfully "vanilla" Laravel website which is much more complex than a base Spark installation. I'm talking 10s of thousands of users daily. That averages a response time of 90-100ms seconds, even whilst we're at peak throughput of approximately 1.82k rpm.
I can't understand why Spark is considerably slower.
@Dan ok, just curious, how long does it take a page to load?
Please or to participate in this conversation.