Skip to content

u/deffjay

In this archive from Jul 2020 to Jun 2025

2
posts
36
comments
0
media
68
score
1 saved before deletion

Top posts

Recommendations for Nova or Backpack

We are looking to add an admin panel to our existing product that is based in Laravel. I've narrowed down our choices to Nova and Backpack, however, I thought I would ask this community for their suggestions based on their own integration experiences. Our needs for the admin panel are fairly standar...

1 points6 comments
Open on Reddit

Top comments

Just recapping what other people said and adding some of my own colour/opinions on this subject:

  • API response size and response time are most likely not connected. Especially dealing with such a small response footprint. Perhaps if you start getting into responses in the MB/GB ...IO performance becomes a factor, these two could be connected. Not the case here.
  • Use /u/tontonsb suggestion of creating the most simple example of an API response to get your PHP/Laravel baseline response time. From there you can start adding layers such as logging, SQL queries, etc, to understand what is causing your slowdown
  • Follow /u/nielsd0's suggestion and learn about PHP OPCache. Especially under PHP 7.4 since it requires a bit more work to utilize it correctly.
  • If you are able to upgrade to PHP 8/*, PHP 8 added jit compilation used with OPCache and makes dealing with OPCache almost invisible to the developer. [Best of both worlds! Here's a link for more info and setup instructions](https://stitcher.io/blog/php-8-jit-setup). I've been PHP 8.0.3 in production for 6+ months, so no worries there.
  • I have had API response times as low as ~45ms PHP 7.4/Laravel 8, even when executing optimized MySQL selects with JSON response. So yes, 600ms is expensive'ish (far from the worst though). This gives you a VERY ANECDOTAL sense of what can be be achieved when dealing with NGINX/PHP/Laravel/MySQL
  • In my experience of dealing with slow API calls that utilize databases, slow or non-existent table indexes for executed queries are responsible for ~85% of your problems. Tackle this challenge once you have your baseline 'hello world' API call responding quickly.
  • Before you start adding caching components, using Redis, or Laravel Octane to improve performance, figure out the core reasons for the initial slow API response. This will ensure that your caching attempts are not just masking an underlying problem, and impacting your base assumptions around performance/scalability of your tech stack

Some of these discoveries were hard earned and have directly contributed to my grey hair count! Best of luck!

10 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.