Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

neerajgoswami's avatar

how to increase server response time?

how to increase server response time? Getting 1 sec to get response from server, although server response time should be under 200ms.

0 likes
1 reply
tykus's avatar

The answer to your question is necessarily broad because every situation is different.

Check your browser's Network tab in the Develop Tools. It will begin to give you some indication of the number of requests per URI and how time is spent serving that request. If there are lots of requests, try to reduce them:

  • concatenate javascript files
  • concatenate and minify stylesheets

Reduce the sizes of your assets

  • reduce image sizes
  • choose your web fonts carefully - do you really need all of the variations?
  • minify javascript
  • minify and PostCSS process your stylesheets

Move blocking assets (javascript) to the end of your HTML document (if possible). Make javascript async if possible.

Check how long your app is taking to serve the request. If needed, install Laravel DebugBar and check how many queries you are running; reduce if possible using eager-loading on models and relations; using joins where appropriate. Limit the amount of data being requested - paginate results; select specific fields rather that all (*)

On the database level, appropriately chosen indexes will improve query performance.

Check your PHP code, could it be more efficient?

1 like

Please or to participate in this conversation.