Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Does Laravel Api ressources affects performance (speed) of response and makes App slower?

I need to use the laravel api ressources to transform some attributes but i don’t know how it affects the speed of the request especially if we have a large database.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Laravel’s resource classes allow you to expressively and easily transform your models and model collections into JSON. It should not make your app any slower than it already is. If your app is slower you can do the following.

  1. Edger Load relations
  2. Try to get large data in chunks using laravel’s Chunk() method
  3. Indexing In Database frequent queries
  4. Cache where real-time data is not required
  5. Use Queue when required
  6. Cache Config, Routes
  7. Limit using third party packages
  8. JIT Compiler
  9. Optimize Composer Autoload
  10. Classmap optimization
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading