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
140
Tonic Application Architecture
milon
0
440
JavaScript for the rest of us
milon
0
5.8k
What are you expecting from next version of Laravel?
milon
1
1.6k
Other Decks in Technology
See All in Technology
ChatGPTのLT会-メモソフトにChatGPT入れると結構便利
okada_fuutass
0
150
Webエンジニアのためのデータエンジニアリング概説
mtoriyama000
5
400
都政新報2024年3月1日号
govtechtokyo
0
150
第131回 雲勉【オンライン】AWSを9年触ってきて経験した落とし穴、ハマったポイント
iret
6
470
The Twelve-Factor App とクラウドアプリケーションのコスト
ny7760
3
260
Feature Flag Deep Dive
biwashi
20
5k
GitHub Actions Runner Controller
takesection
0
110
プロデザ! BY リクルートvol.17_『じゃらんnet』公式アプリの高速リニューアル事例を大公開
recruitengineers
PRO
5
110
EKSの認証認可の仕組みとEKS APIを用いた認可制御について
daitak
0
250
SecurityCamp2023基板作るコース講義資料/Security Camp 2023 Lecture Materials
tnishinaga
5
1.3k
App Runnerでパラメーターストアの値を使ってみた
miura55
0
230
[AWS Expert Online for JAWS-UG]AWS SAW を使ったトラブルシューティング効率化のススメ
furuton
0
160
Featured
See All Featured
Six Lessons from altMBA
skipperchong
19
2.9k
4 Signs Your Business is Dying
shpigford
174
21k
What the flash - Photography Introduction
edds
64
11k
Designing for humans not robots
tammielis
247
25k
It's Worth the Effort
3n
180
27k
The Mythical Team-Month
searls
214
42k
Building an army of robots
kneath
300
41k
10 Git Anti Patterns You Should be Aware of
lemiorhan
644
57k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
111
35k
The Invisible Customer
myddelton
114
12k
GraphQLとの向き合い方2022年版
quramy
28
12k
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 ??