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.4k
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
180
Tonic Application Architecture
milon
0
500
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
「頑張る」を「楽しむ」に変換する技術
tomoyakitaura
10
1.8k
プロダクト開発者目線での Entra ID 活用
sansantech
PRO
0
260
開発者体験を定量的に把握する手法と活用事例
ham0215
0
160
AIエージェント開発のノウハウと課題
pharma_x_tech
10
5.8k
スクラムというコンフォートゾーンから抜け出そう!プロジェクト全体に目を向けるインセプションデッキ / Inception Deck for seeing the whole project
takaking22
4
350
【Snowflake九州ユーザー会#2】BigQueryとSnowflakeを比較してそれぞれの良し悪しを掴む / BigQuery vs Snowflake: Pros & Cons
civitaspo
5
1.6k
リクルートのエンジニア組織を下支えする 新卒の育成の仕組み
recruitengineers
PRO
2
220
【Forkwell】「正しく」失敗できるチームを作る──現場のリーダーのための恐怖と不安を乗り越える技術 - FL#83 / A team that can fail correctly by forkwell
i35_267
2
180
人生を左右する「即答」のススメ: 一瞬の判断を間違えないためにするべきこと
takasyou
9
1.3k
StotybookからはじめるVRT -個人開発編-
arrow2nd
1
190
いまから始めるAWS CDK 〜モダンなインフラ構築入門〜/iac-night-cdk-introduction
tomoki10
3
640
OSSの実装を参考にBedrockエージェントを作る
moritalous
2
380
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Rails Girls Zürich Keynote
gr2m
94
13k
Git: the NoSQL Database
bkeepers
PRO
429
65k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Raft: Consensus for Rubyists
vanstee
137
6.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Building Adaptive Systems
keathley
40
2.4k
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
contact@milon.im https://speakerdeck.com/milon/high-performance-laravel ??