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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andre Luis Anastacio
June 20, 2015
Programming
0
110
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
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
99
Ruby Game Development
andreanastacio
1
140
Desenvolvimento de Games com Opal + Phaser.io
andreanastacio
1
860
Workshop Unity3D - Unesp Rio Claro
andreanastacio
0
160
Workshop de Ruby - Semana Integrada PUC Campinas
andreanastacio
0
94
Other Decks in Programming
See All in Programming
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.1k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
160
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
950
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
230
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
940
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
160
Claude Codeログ基盤の構築
giginet
PRO
7
3.6k
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.2k
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
140
AHC061解説
shun_pi
0
420
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Building Applications with DynamoDB
mza
96
7k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
Build your cross-platform service in a week with App Engine
jlugia
234
18k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
84
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Everyday Curiosity
cassininazir
0
170
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
490
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
160
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
RailsConf 2023
tenderlove
30
1.4k
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!