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
Tunando o seu código Ruby
Search
Andre Luis Anastacio
June 20, 2015
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
230
Reagent - Um react.js minimalista em ClojureScript e Outras ferramentas legais
andreanastacio
0
160
Melhorando suas habilidades Hackeando o seu primeiro Game
andreanastacio
0
120
Ruby Game Development
andreanastacio
1
160
Desenvolvimento de Games com Opal + Phaser.io
andreanastacio
1
890
Workshop Unity3D - Unesp Rio Claro
andreanastacio
0
180
Workshop de Ruby - Semana Integrada PUC Campinas
andreanastacio
0
110
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
パーソナライズPodcastを作った話
repunit11
0
120
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
21k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
340
Kubernetes祭り #2 OP/ED
bells17
0
100
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
550
Simple Storage Service(S3) is not simple
iwatsukayura
0
210
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
270
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
110
Featured
See All Featured
Design in an AI World
tapps
1
350
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
It's Worth the Effort
3n
188
29k
Typedesign – Prime Four
hannesfritz
42
3.2k
4 Signs Your Business is Dying
shpigford
187
23k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Art, The Web, and Tiny UX
lynnandtonic
304
22k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
610
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Visualization
eitanlees
153
17k
Documentation Writing (for coders)
carmenintech
77
5.6k
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!