10 May '13, 1pm

Used ruby profiler for real for the first time. 30 minutes later reduced request time by 90%

Used ruby profiler for real for the first time. 30 minutes later reduced request time by 90%

When I find some Ruby on Rails or Rake tasks running slowly, I throw a quick and dirty profiler around the suspect code to find the bottlenecks with ease. Here’s how I do it, maybe this approach can help you too. To profile in Ruby on Rails, add the following to your Gemfile 1 gem 'ruby-prof' And don’t forget to run bundle . Add the following file into your lib folder class DevelopmentProfiler def self.prof(file_name) RubyProf.start yield results = RubyProf.stop # Print a flat profile to text File.open "#{Rails.root}/tmp/performance/#{file_name}-graph.html", 'w' do |file| RubyProf::GraphHtmlPrinter.new(results).print(file) end File.open "#{Rails.root}/tmp/performance/#{file_name}-flat.txt", 'w' do |file| # RubyProf::FlatPrinter.new(results).print(file) RubyProf::FlatPrinterWithLineNumbers.new(results).print(file) end File.open "#{Rails.root}/tmp/performance/#{file_name}-st...

Full article: http://hiltmon.com/blog/2012/02/27/quick-and-dirty-rails-...

Tweets

Top Ruby Article: New screencast: Improving Per...

robots.thoughtbot.com 10 May '13, 2am

May 9, 2013 cpytel performance ruby on rails New screencast: Improving Performance for Real-time Requests We’re pleased to...

What is a has_many :through association in Ruby...

blog.teamtreehouse.com 09 May '13, 5pm

In this Treehouse Quick Tip, Jason demystifies the concepts behind what a has many :through association is in Ruby on Rail...

Thanks for the shout out for Efficiency First (it's a good article too!)

Thanks for the shout out for Efficiency First (...

buildinggreen.com 10 May '13, 3am

Few others are thinking about energy audits and weatherization, but now’s a good time. Weatherization should target the bi...

WebSockets in Rails 4 - #rails #ruby

ngauthier.com 11 May '13, 8am

WebSockets in Rails 4 by Nick Gauthier on 2013-03-12 I've been using Rails 4 (beta) a lot recently. In a previous post we ...

Climate hits 400ppm of CO2 for first time in 3 million years

Climate hits 400ppm of CO2 for first time in 3 ...

treehugger.com 10 May '13, 9pm

Humanity is all but certain to zoom past 400 parts per million. The big question is, how far past? For a long time, many c...

A Good Time for Energy Audits and Weatherization

A Good Time for Energy Audits and Weatherization

greenbuildingadvisor.com 09 May '13, 8am

Wait a second. Spring has barely sprung, and you’re saying we need to start thinking about energy audits already? What’s u...

New job available: Senior Developer, Ruby on Ra...

cooldesignjobs.com 09 May '13, 1pm

At Litmus we build cutting edge tools to help email marketers. We’re used by over 100,000 email marketers all around the w...

SEO-friendly single-page apps in Rails via @piv...

pivotallabs.com 10 May '13, 12am

To make all this process as simple as possible, a variation of the third approach (Rack middleware + Selenium Webdriver + ...

Rails AntiPatterns: Best Practice Ruby on Rails...

it-ebooks.com 11 May '13, 11am

keywords:web rails,rails web,rubyon rails,ruby on rails,ruby for rails, The Complete Guide to Avoiding and Fixing Common R...

Brazil's satellite monitoring reduced Amazon deforestation by 60,000 sq km in 5 years

Brazil's satellite monitoring reduced Amazon de...

news.mongabay.com 09 May '13, 2am

Conflict zones have higher deforestation rates in the Amazon (03/28/2013) Areas in the Amazon where there is conflict over...

This weeks Ruby Weekly newsletter is full of go...

rubyweekly.com 09 May '13, 11am

Phusion Passenger 4.0.1 Released So reassured of its quality, the Phusion crew decided to leap straight to a more trustwor...

Cooley reporting on "Real Intent's not-so-secret DVcon'13 Report" #DVCon #semiEDA

Cooley reporting on "Real Intent's not-so-secre...

deepchip.com 09 May '13, 4pm

/o o\ / it's a FEATURE!" (508) 429-4357 ( > ) \ - / INDUSTRY GADFLY: "Real Intent's not-so-secret DVcon'13 Report" _] [_ b...

New job available: Software Engineer – Ruby on ...

cooldesignjobs.com 11 May '13, 10pm

We’re hiring for a range of engineering roles and responsibilities! Check out the complete list at http://www.sharethrough...

.@GreaneTree is looking for a Ruby on Rails developer. I’m new here and loving it. Here are some details -

.@GreaneTree is looking for a Ruby on Rails dev...

greanetree.com 09 May '13, 8pm

Greane Tree Technology is a fast-paced environment with multiple projects in development concurrently. We follow the Agile...

Code Fellows Launches Women-Only Ruby on Rails ...

businesswire.com 09 May '13, 12pm

SEATTLE--(BUSINESS WIRE )--Code Fellows , the only coding education provider that guarantees a $60,000 tech job after grad...