By Alexander Dymo
You do not have to just accept sluggish Ruby or Rails functionality. during this finished advisor to Ruby optimization, you are going to the way to write quicker Ruby code--but that is only the start. See precisely what makes Ruby and Rails code sluggish, and the way to mend it. Alex Dymo will advisor you thru perils of reminiscence and CPU optimization, profiling, measuring, functionality checking out, rubbish assortment, and tuning. you will discover that every one these "hard" issues are not so tricky in any case, and your code will run orders of value faster.
This is the 1st booklet ever that consolidates all of the Ruby functionality optimization suggestion in a single position. it is your complete consultant to reminiscence optimization, CPU optimization, rubbish collector tuning, profiling, measurements, functionality trying out, and more.
You'll cross from functionality rookie to professional. First, you will research the simplest practices for writing Ruby code that is effortless not just at the CPU, but additionally on reminiscence, and that does not set off the feared rubbish collector. you can find out that rubbish assortment money owed for eighty% of slowdowns, and infrequently takes greater than 50% of your program's execution time. and you can notice the bottlenecks in Rails code and find out how selective characteristic loading and preloading can mitigate the functionality expenditures of ActiveRecord.
As you enhance to Ruby functionality professional, you will learn the way profile your code, tips to make feel out of profiler reviews, and the way to make optimization judgements according to them. you will ensure gradual code does not creep again into your Ruby software via writing functionality checks, and you can examine how you can benchmark Ruby.
And eventually, you are going to dive into the Ruby interpreter internals to truly comprehend why rubbish assortment makes Ruby so gradual, and the way you could song it up.
What You Need:
Some model of Ruby. the recommendation from this ebook applies to all sleek Ruby types from 1.9 to 2.2. eighty% of the cloth may also be necessary for legacy Ruby 1.8 clients, and there's 1.8-specific suggestion as well.