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
0
92
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
200
Reagent - Um react.js minimalista em ClojureScript e Outras ferramentas legais
andreanastacio
0
140
Melhorando suas habilidades Hackeando o seu primeiro Game
andreanastacio
0
83
Ruby Game Development
andreanastacio
1
120
Desenvolvimento de Games com Opal + Phaser.io
andreanastacio
1
810
Workshop Unity3D - Unesp Rio Claro
andreanastacio
0
130
Workshop de Ruby - Semana Integrada PUC Campinas
andreanastacio
0
78
Other Decks in Programming
See All in Programming
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
260
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Security_for_introducing_eBPF
kentatada
0
110
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.3k
Haze - Real time background blurring
chrisbanes
1
510
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Documentation Writing (for coders)
carmenintech
66
4.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
4 Signs Your Business is Dying
shpigford
181
21k
The Invisible Side of Design
smashingmag
298
50k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A designer walks into a library…
pauljervisheath
204
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Mobile First: as difficult as doing things right
swwweet
222
9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Become a Pro
speakerdeck
PRO
26
5k
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!