By Alexander Dymo
You would not have to simply accept sluggish Ruby or Rails functionality. during this complete advisor to Ruby optimization, you will the way to write swifter Ruby code--but that is only the start. See precisely what makes Ruby and Rails code gradual, and the way to mend it. Alex Dymo will consultant you thru perils of reminiscence and CPU optimization, profiling, measuring, functionality trying out, rubbish assortment, and tuning. you can find that each one these "hard" issues will not be so tricky in spite of everything, and your code will run orders of value faster.
This is the 1st ebook ever that consolidates the entire Ruby functionality optimization suggestion in a single position. it is your finished advisor to reminiscence optimization, CPU optimization, rubbish collector tuning, profiling, measurements, functionality checking out, and more.
You'll move from functionality rookie to specialist. First, you are going to study the easiest practices for writing Ruby code that is effortless not just at the CPU, but in addition on reminiscence, and that does not set off the feared rubbish collector. you will find out that rubbish assortment bills for eighty% of slowdowns, and infrequently takes greater than 50% of your program's execution time. and you can realize the bottlenecks in Rails code and learn the way selective characteristic loading and preloading can mitigate the functionality expenditures of ActiveRecord.
As you enhance to Ruby functionality specialist, you are going to find out how profile your code, how one can make experience out of profiler reviews, and the way to make optimization judgements according to them. you are going to confirm gradual code does not creep again into your Ruby program by way of writing functionality exams, and you can research the way to benchmark Ruby.
And eventually, you are going to dive into the Ruby interpreter internals to actually comprehend why rubbish assortment makes Ruby so gradual, and the way you could music it up.
What You Need:
Some model of Ruby. the recommendation from this booklet applies to all sleek Ruby models from 1.9 to 2.2. eighty% of the fabric may also be invaluable for legacy Ruby 1.8 clients, and there's 1.8-specific recommendation as well.