Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tunando o seu código Ruby
Search
Andre Luis Anastacio
June 20, 2015
Programming
0
100
Tunando o seu código Ruby
Palestra ministrada no RuPy Campinas 2015
Andre Luis Anastacio
June 20, 2015
Tweet
Share
More Decks by Andre Luis Anastacio
See All by Andre Luis Anastacio
Effective Rails Instrumentation
andreanastacio
4
210
Reagent - Um react.js minimalista em ClojureScript e Outras ferramentas legais
andreanastacio
0
140
Melhorando suas habilidades Hackeando o seu primeiro Game
andreanastacio
0
92
Ruby Game Development
andreanastacio
1
130
Desenvolvimento de Games com Opal + Phaser.io
andreanastacio
1
850
Workshop Unity3D - Unesp Rio Claro
andreanastacio
0
150
Workshop de Ruby - Semana Integrada PUC Campinas
andreanastacio
0
86
Other Decks in Programming
See All in Programming
関数実行の裏側では何が起きているのか?
minop1205
1
660
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
420
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
780
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
170
How Software Deployment tools have changed in the past 20 years
geshan
0
28k
認証・認可の基本を学ぼう前編
kouyuume
0
180
俺流レスポンシブコーディング 2025
tak_dcxi
13
8.2k
CSC509 Lecture 14
javiergs
PRO
0
220
AIコーディングエージェント(NotebookLM)
kondai24
0
150
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
340
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
150
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
290
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Automating Front-end Workflow
addyosmani
1371
200k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
88
Context Engineering - Making Every Token Count
addyosmani
9
480
How to train your dragon (web standard)
notwaldorf
97
6.4k
BBQ
matthewcrist
89
9.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Building Applications with DynamoDB
mza
96
6.8k
Transcript
Tunando o seu código Ruby
None
André Luís @ndrluis
None
None
None
None
VAMOS FALAR DE COISA BOA?
None
None
RUBY É LENTO?
RAILS É LENTO?
TUNAR GC É NECESSARIO?
http://helabs.com/blog/2014/12/19/ruby-gc-tuning-parameters/ http://www.akitaonrails.com/2015/03/27/small-bites-novidades-no- garbage-collector-do-ruby-2-2-1#.VYTSx2DrdBU http://www.infoq.com/br/presentations/entendendo-garbage- collector-ruby
APRENDA A MENSURAR
https://github.com/schneems/derailed_benchmarks Richard Schneeman
$ derailed bundle:mem TOP: 87.5938 mb carrierwave: 35.9023 mb carrierwave/storage:
27.2773 mb fog: 27.125 mb fog/joyent: 5.2266 mb fog/joyent/compute: 5.1641 mb net/ssh: 4.9297 mb net/ssh/transport/session: 2.5977 mb net/ssh/transport/algorithms: 1.7188 mb net/ssh/transport/kex: 0.4375 mb net/ssh/transport/hmac: 0.375 mb net/ssh/transport/packet_stream: 0.5078 mb net/ssh/authentication/session: 1.0508 mb net/ssh/authentication/key_manager: 0.5039 mb net/ssh/connection/session: 0.9531 mb net/ssh/connection/channel: 0.3203 mb
refile/rails: 0.9688 mb refile: 0.9688 mb rest_client: 0.6367 mb /Users/…/lib/restclient:
0.6367 mb /Users/…/lib/restclient/abstract_response: 0.4844 mb http-cookie: 0.4844 mb http/cookie: 0.4805 mb domain_name: 0.3984 mb domain_name/etld_data: 0.3789 mb
$ derailed bundle:objects allocated objects by gem ----------------------------------- 281 refile-0.5.5
2499 carrierwave-0.10.0
$ derailed bundle:mem TOP: 89.2617 mb activeadmin: 24.1797 mb active_admin:
24.1797 mb ransack: 6.9805 mb ransack/adapters/active_record: 3.0039 mb action_view/view_paths: 0.6992 mb action_view/base: 0.6328 mb ransack/search: 0.4063 mb action_dispatch/http/request: 0.3828 mb active_admin/batch_actions: 4.0039 mb
Refile > Carrierwave RailsAdmin > ActiveAdmin
NÃO NECESSARIAMENTE
refile/rails: 2.3555 mb refile: 2.2539 mb rest_client: 1.7109 mb
LOGO…..
SABER MENSURAR É IMPORTANTE
None
Benchmark
None
None
benchmark-ips https://github.com/evanphx/benchmark-ips
None
slow 47524.3 (± 7.6%) i/s fast 56823.2 (± 7.2%) i/s
20% mais rapido
CUIDADO COM OPTIMIZAÇÃO PREMATURA!
CRIE MENOS OBJETOS!
Obrigado!