#how to make request fast?

7 messages · Page 1 of 1 (latest)

little sigil
#

how to make request fast

woven needle
#

How to awnser your question

olive dew
#

@little sigil Can you provide more information? You’re not going to get much help with such a vague question.

minor lintel
#

How to make request fast

little sigil
echo lark
#
  1. You need to know that requests on localhost are slightly slower than on a server.
  2. If you're using the Laravel debugbar, well, that'll slow things down too.
    So for these two problems, deploying your site (which of course you're going to do) will fix them.
  3. Talking about website performance in general (not just Laravel websites - including Laravel websites), there are a lot of things that play a role in it, from the specs of your server to simple things like using images wisely (using fewer images as possible - and even compressing them) and minimising your code (removing all unnecessary characters like spaces and comments), it's really a vast thing that no one can explain to you in an answer, you have to search about it, read blog posts, watch videos and you will learn a bit from each blog and video, you can start from here: https://developer.mozilla.org/en-US/docs/Learn/Performance
  4. For Laravel, the most important thing you need to know to improve performance is to interact with the database efficiently, fewer queries are better, and it's very easy to make mistakes when using ORMs like Eloquent, use Laravel Debugbar to see the queries that are happening, and yes, avoid the N+1 query problem: read more about it here: https://laravel-news.com/laravel-n1-query-problems
    Here is a good article on Laravel performance: https://www.cloudways.com/blog/laravel-performance-optimization
    More good resources:
    https://www.youtube.com/watch?v=csWx7RcNh5U
    https://www.youtube.com/watch?v=bi2bEXBa9Ko
    https://www.youtube.com/watch?v=reki-z7pxqg
    https://laraveldaily.com/tag/performance