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
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
5
590
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
280
TypeScript、上達の瞬間
sadnessojisan
46
13k
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
フルカイテン株式会社 採用資料
fullkaiten
0
40k
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
Featured
See All Featured
Teambox: Starting and Learning
jrom
133
8.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Automating Front-end Workflow
addyosmani
1366
200k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Visualization
eitanlees
145
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
A better future with KSS
kneath
238
17k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Cult of Friendly URLs
andyhume
78
6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
RailsConf 2023
tenderlove
29
900
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 ??