Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Confoo 2016 - Make it Faster
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Guillaume Malette
February 25, 2016
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Confoo 2016 - Make it Faster
Guillaume Malette
February 25, 2016
More Decks by Guillaume Malette
See All by Guillaume Malette
Handling Uniqueness and Duplicates in Rails
gmalette
0
47
Simplifying Controllers - Confoo 2015
gmalette
1
96
Migrating to Single Table Inheritance
gmalette
1
99
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
110
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
140
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
380
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
250
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
330
Building an Out-of-Order CPU
latte72
1
780
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
270
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
190
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
App Intentsのビルドプロセスを支える技術
kntkymt
0
380
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
320
Webの地図
yosuke_furukawa
PRO
6
4.5k
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
Thoughts on Productivity
jonyablonski
76
5.4k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
A better future with KSS
kneath
240
18k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
Agile that works and the tools we love
rasmusluckow
331
22k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Transcript
make it faster Guillaume Malette gmalette ! "
None
None
None
None
https://github.com/gmalette/Confoo2016/
we need to talk
phpbench.com
#perfmatters http://www4.akamai.com/html/about/press/releases/2009/press_091409.html https://blog.kissmetrics.com/loading-time/
slow is what? https://www.nngroup.com/articles/response-times-3-important-limits/
None
None
why is my site slow?
php php php php laravel php php php ruby rails
API sql redis memcached etc
None
benchmark identify change
benchmark
reusable high confidence
None
client nginx application action query
// https://github.com/gmalette/Confoo2016 public function handle($request, Closure $next) { \Log::info( sprintf(
"\n\n[Request] Started to %s routed to %s", $request->path(), $request->route()->getAction()['controller'] ) ); $before = microtime(true); $response = $next($request); $after = microtime(true); \Log::info( sprintf( "[Request] Responded %d in %dms", $response->status(), ($after - $before) * 1000 ) ); return $response; }
// https://github.com/gmalette/Confoo2016 public function handle($request, Closure $next) { \Log::info( sprintf(
"\n\n[Request] Started to %s routed to %s", $request->path(), $request->route()->getAction()['controller'] ) ); $before = microtime(true); $response = $next($request); $after = microtime(true); \Log::info( sprintf( "[Request] Responded %d in %dms", $response->status(), ($after - $before) * 1000 ) ); return $response; }
[Request] Started to / routed to \PostsController@getIndex ... [Request] Responded
200 in 330ms
identify
New Relic Datadog
None
change
benchmark
benchmark identify change
questions?
database
None
logs
orm logs
[SQL] select * from `users` where `users`.`id` = 7842 limit
1 (0.63 ms) [SQL] select * from `tags` where `tags`.`post_id` = 30 and `tags`.`post_id` is not null (0.6 ms)
None
n+1 queries
posts = Post.all posts.each do |post| puts post.author.email end
posts = Post.all posts.each do |post| puts post.author.email end
posts = Post.includes(:author).all posts.each do |post| puts post.author.email end
None
slow query logs
# Time: 2016-02-20T17:09:43.618399Z # User@Host: homestead[homestead] @ [172.16.225.2] Id: 2465
# Query_time: 1.151 Lock_time: 0.00013 Rows_sent: 50 Rows_examined: 500000 select * from `tags` where `tags`.`post_id` in ( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' );
# Time: 2016-02-20T17:09:43.618399Z # User@Host: homestead[homestead] @ [172.16.225.2] Id: 2465
# Query_time: 1.151 Lock_time: 0.00013 Rows_sent: 50 Rows_examined: 500000 select * from `tags` where `tags`.`post_id` in ( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' );
# Time: 2016-02-20T17:09:43.618399Z # User@Host: homestead[homestead] @ [172.16.225.2] Id: 2465
# Query_time: 1.151 Lock_time: 0.00013 Rows_sent: 50 Rows_examined: 500000 select * from `tags` where `tags`.`post_id` in ( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' );
# Time: 2016-02-20T17:09:43.618399Z # User@Host: homestead[homestead] @ [172.16.225.2] Id: 2465
# Query_time: 1.151 Lock_time: 0.00013 Rows_sent: 50 Rows_examined: 500000 select * from `tags` where `tags`.`post_id` in ( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ); /*application:Shopify,controller:orders,request_id:bc12813bce*/ basecamp/marginalia
None
api
background
analytics emails uploads
preload
cache
None
cpu
software profilers
flamegraph stackprof xhprof
wall cpu memory
������������������� ��������������������� ������������������������������� ����������������������������� ������������ ������������������ ����� ����������������������������� ������������ �����������������
����� ������������������������������������������ �������� ���������������� ��������������������������������������� �������� ��������������� ���� ����������������������������������������������� �������� ��������������� ���� �������������������������������������� �������� ���������������� ��������������������������������������������� �������� ��������������� ���� ���������������������������������������������������� �������� ��������������� ���� ���������������������������������������������� �������� ��������������� �������������������������������������������� �������� ��������������� ���� ������������������������� �������� ��������������� ��������������������������� �������� ��������������� ���� ��������������������������� �������� ��������������� ���� ������������������������ �������� ��������������� ���� �������������������������� �������� ��������������� ���� ���������������������������� �������� ��������������� ����������������������������������� �������� ��������������� ���� ��������������������������������� �������� ��������������� ���� ���� �������������������������������������� �������� ��������������� ���� ����������������������������������� �������� ��������������� ���� ������������������������ �������� ��������������� ���� ������������������������������ �������� ��������������� ���� ������������������������� �������� ��������������� ���� ������������������ �������� ��������������� ���� ����������������������������������������������������������� �������� ��������������� ���� ��������������� �������� ��������������� ���� ��������������������������� �������� ��������������� ���� ������������������ �������� ��������������� ���� ����������������������� �������� ��������������� ���� ������������������������� �������� ��������������� ���� ������������������ �������� ��������������� ���� ���� ����������������������������� �������� ��������������� ����������������������������� �������� ��������������� ���� ��������������������������� �������� ��������������� ���� ������������������������������������ �������� ��������������� ���� ���� ������������������������������ �������� ��������������� ���� ������������������������������������������ �������� ��������������� ���� ���� ����������������������������������������������������������� �������� ��������������� ���� ���� ����������������������������������� �������� ��������������� �������������������������� �������� ��������������� ���� ����������������������������� �������� ��������������� ���� ���������������������������� �������� ��������������� �������������������������������� �������� ��������������� ���� ���� ���� ��������������������������������� �������� ��������������� ���� ��������������� �������� ��������������� ���� ��������������� �������� ��������������� �������������������������������������� �������� ��������������� ���� ������������������������� �������� ��������������� ���� ���� ������������������������������������� �������� ��������������� ���������������������������������������������� �������� ��������������� ���� ���� ��������������������������������������������������� �������� ��������������� ���� ������������������������������������������������������ �������� ��������������� ���� �������������������������������������������������������� �������� ������������ �� ������������������������������������������������������������������� �������� ��������������� ���� �������������������������������� �������� ��������������� ����������������������������� �������� ��������������� ���� �������������������������������� �������� ��������������� �������������������������������������������������������� �������� ��������������� ���� ����������������������������������������� �������� ��������������� ���� ���������������������������������������������������� �������� ��������������� ���������������������������������������������� �������� ��������������� ���� ���������������������������������������������� �������� ��������������� ���� ��������������������������������������� �������� ��������������� ���� ���� ���� ������������������������������������������������ �������� ��������������� ������������������������������������� �������� ��������������� ���� ������������������������������������� �������� ��������������� ���� ���������������������������������������������� �������� ��������������� ���� ���� ���� ��������������������������������������������������������� �������� ��������������� ��������������������������������������� �������� ��������������� ���� �������������������������������������������� �������� ��������������� ���� ���� ����������������������������������������������������� �������� ��������������� ������������������������������������������ �������� ��������������� ���� �������������������������������������������� �������� ��������������� ������������������������ �������� ��������������� ���� ������������������������������������������� �������� ��������������� ���� ���� ��������������������������������������� �������� ��������������� ���� ���� ���� ���� ���� ���� ���� ���� ���� �������������������������������������������� �������� ������������ ������������������������������������������������������������������ �������� ������������ �� ������������������������������������������� �������� ������������ ����������������������������������� �������� ������������ �� ��������������������������������������� �������� ������������ �� �� �� ��������������������������������������������� �������� ������������
None
benchmark identify change
questions?
thank you! Guillaume Malette gmalette ! "