Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
High Performance Laravel
Search
Nuruzzaman Milon
November 18, 2017
Technology
7
1.3k
High Performance Laravel
Use Laravel to build high-performance web application.
Nuruzzaman Milon
November 18, 2017
Tweet
Share
More Decks by Nuruzzaman Milon
See All by Nuruzzaman Milon
Why you should consider statically generated site for your next website?
milon
0
170
Tonic Application Architecture
milon
0
480
JavaScript for the rest of us
milon
0
5.9k
What are you expecting from next version of Laravel?
milon
1
1.6k
Other Decks in Technology
See All in Technology
CI/CDやテスト自動化の開発プロジェクトへの適用
megascus
3
650
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
サイロ化した金融システムを、packwerk を利用して無事故でリファクタリングした話
coincheck_recruit
3
3.2k
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
0
110
KMPプロジェクトでマニュアルDIを使う選択
rmakiyama
0
120
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
3
180
バイセルにおけるAI活用の取り組みについて紹介します/Generative AI at BuySell Technologies
kyuns
1
200
Overview of file type identifiers
ange
0
210
Mobbing Practices
kawaguti
PRO
3
340
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
120
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
0
250
Capybara+生成AIでどこまで本当に自然言語のテストを書けるか?
yusukeiwaki
6
1.1k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
Faster Mobile Websites
deanohume
304
30k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
A Modern Web Designer's Workflow
chriscoyier
692
190k
RailsConf 2023
tenderlove
29
870
How to Ace a Technical Interview
jacobian
275
23k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Transcript
High performance Laravel
Hello! I am Nuruzzaman Milon Senior Software Engineer @Telenor Health
A\S @to_milon https://milon.im
I wrote a book on laravel ISBN: 978-984-33-9190-2 Buy @
https://milon.im/laravel
Sharing My There is no golden rule, you might have
different opinion. Let me learn from you.
Minimize plugins usage × Don’t use unnecessary plugins. × Don’t
import the whole library just for using a single functionality.
Use Eager loading × Try to avoid N+1 problem ×
Don’t load the whole collection, if you just need the count. × Use `select()` rather than `all()`
Trim your response × Don’t try to render all the
elements at a time, use pagination or lazy loading. × Don’t return, what you don’t need. × Use transformer. (Fractal, Resource etc.)
Use http2 × Use server push to load static assets.
× Use CDN. (if possible)
Optimize Autoloader × Optimize your autoload file × Use either
`composer dump-autoload -- optimize` Or `composer dump-autoload --classmap-authoritative`
Cache routes and configs × Cache your routes file- `php
artisan route:cache` × Cache your config file- `php artisan config:cache` × Don’t use `env()` function
Remove unused services × Comment `ServiceProvider` those are not in
use. × Use `Deferred` Service Providers.
Use Faster Drivers × Use redis driver for session. ×
Use memcached/redis driver for cache. × Use Redis, where you can.
Profile your query × Inspect your query. × Use a
good profiler. (Blackfire) × Use a debugbar while developing. × Cache your query.
Use queue for expensive task × Use queue for long
running task. × Use queue for CPU or memory intensive tasks. × Return early, if it’s possible. × Use a good monitoring tool. (Horizon)
Inspect Exceptions and Log × Use a good error reporting
tool like Bugsnag, Sentry etc. × Log every possible failed scenario. × Use `logrotate` to manage log files. × Use benchmarking tool. (ab, wrk etc.)
Consider lumen × Consider micro services. × Don’t built just
another monolithic application. × Decide wisely. (or cautiously?) × Avoid NANO services.
Place your screenshot here You Ain’t Gonna Need It.
THANKS! Any questions? You can find me at - @to_milon
[email protected]
https://speakerdeck.com/milon/high-performance-laravel ??