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
Tunando o seu código Ruby
Search
Andre Luis Anastacio
June 20, 2015
Programming
110
0
Share
Tunando o seu código Ruby
Palestra ministrada no RuPy Campinas 2015
Andre Luis Anastacio
June 20, 2015
More Decks by Andre Luis Anastacio
See All by Andre Luis Anastacio
Effective Rails Instrumentation
andreanastacio
4
220
Reagent - Um react.js minimalista em ClojureScript e Outras ferramentas legais
andreanastacio
0
150
Melhorando suas habilidades Hackeando o seu primeiro Game
andreanastacio
0
100
Ruby Game Development
andreanastacio
1
150
Desenvolvimento de Games com Opal + Phaser.io
andreanastacio
1
870
Workshop Unity3D - Unesp Rio Claro
andreanastacio
0
160
Workshop de Ruby - Semana Integrada PUC Campinas
andreanastacio
0
97
Other Decks in Programming
See All in Programming
20260514_its_the_context_window_stupid.pdf
heita
0
1k
書き換えて学ぶTemporal #fukts
pirosikick
2
380
Back to the roots of date
jinroq
0
840
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.2k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
390
Firefoxにコントリビューションして得られた学び
ken7253
2
160
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.9k
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
200
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
350
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
690
From π to Pie charts
rasagy
0
180
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
230
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Ruling the World: When Life Gets Gamed
codingconduct
0
230
Google's AI Overviews - The New Search
badams
0
1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
Building Applications with DynamoDB
mza
96
7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
560
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!