<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ruby object allocation &amp; why you should care</title>
	<atom:link href="http://merbist.com/2010/07/29/object-allocation-why-you-should-care/feed/" rel="self" type="application/rss+xml" />
	<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/</link>
	<description>Random thoughts of a software developer</description>
	<lastBuildDate>Sat, 31 Dec 2011 05:29:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Geoff Tidey</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1280</link>
		<dc:creator>Geoff Tidey</dc:creator>
		<pubDate>Tue, 03 Aug 2010 15:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1280</guid>
		<description>Thanks for a great article.  I shall buy you this: http://static2.syswear.com/images/shirts/30/30_folded_large_black.png, when I&#039;ve got some money :-)</description>
		<content:encoded><![CDATA[<p>Thanks for a great article.  I shall buy you this: <a href="http://static2.syswear.com/images/shirts/30/30_folded_large_black.png" rel="nofollow">http://static2.syswear.com/images/shirts/30/30_folded_large_black.png</a>, when I&#8217;ve got some money <img src='http://merbist.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit Arondekar</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1237</link>
		<dc:creator>Rohit Arondekar</dc:creator>
		<pubDate>Sat, 31 Jul 2010 01:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1237</guid>
		<description>I&#039;m curious as to whether the GC algorithm used in MRI is meant for high performance. What would the effect be (theoretically) of using a different/better GC? Also it would be nice to be able to swap in/out GC&#039;s so that you can use the one that&#039;s perfect for you. /end_crazy_thoughts

Nice article, eye opening! :)</description>
		<content:encoded><![CDATA[<p>I&#8217;m curious as to whether the GC algorithm used in MRI is meant for high performance. What would the effect be (theoretically) of using a different/better GC? Also it would be nice to be able to swap in/out GC&#8217;s so that you can use the one that&#8217;s perfect for you. /end_crazy_thoughts</p>
<p>Nice article, eye opening! <img src='http://merbist.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Aimonetti</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1236</link>
		<dc:creator>Matt Aimonetti</dc:creator>
		<pubDate>Fri, 30 Jul 2010 22:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1236</guid>
		<description>It depends what you call &quot;rich&quot; but I agree that mounting Rack/Sinatra apps in a Rails app might be interesting. I did not check the overhead for doing that (if any) since in this specific case Rails&#039; value isn&#039;t worth the complexity but others might want to look into that alternative.  

However, that still doesn&#039;t solve the root problem: Rails allocating too many objects. Also depending on how you do caching, the allocation will still happen and you will spend a lot of time in the GC.</description>
		<content:encoded><![CDATA[<p>It depends what you call &#8220;rich&#8221; but I agree that mounting Rack/Sinatra apps in a Rails app might be interesting. I did not check the overhead for doing that (if any) since in this specific case Rails&#8217; value isn&#8217;t worth the complexity but others might want to look into that alternative.  </p>
<p>However, that still doesn&#8217;t solve the root problem: Rails allocating too many objects. Also depending on how you do caching, the allocation will still happen and you will spend a lot of time in the GC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Bates</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1235</link>
		<dc:creator>Ryan Bates</dc:creator>
		<pubDate>Fri, 30 Jul 2010 21:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1235</guid>
		<description>Since Rails adopts Rack, why not use Rails for the feature rich parts of the application and put just the performance critical parts into a Sinatra app or a custom Rack application?

For example, an in e-commerce app there&#039;s usually a lot of complexity in the checkout process but it is not visited very frequently. Leave that in Rails but strip down the home page and other frequently visited pages using rack or caching.

That said, thanks for this article. It is very enlightening and I would love to see object allocation play a bigger role when optimizing Rails and other frameworks.</description>
		<content:encoded><![CDATA[<p>Since Rails adopts Rack, why not use Rails for the feature rich parts of the application and put just the performance critical parts into a Sinatra app or a custom Rack application?</p>
<p>For example, an in e-commerce app there&#8217;s usually a lot of complexity in the checkout process but it is not visited very frequently. Leave that in Rails but strip down the home page and other frequently visited pages using rack or caching.</p>
<p>That said, thanks for this article. It is very enlightening and I would love to see object allocation play a bigger role when optimizing Rails and other frameworks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Bates</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1234</link>
		<dc:creator>Ryan Bates</dc:creator>
		<pubDate>Fri, 30 Jul 2010 20:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1234</guid>
		<description>I think there he is referring to explicit object allocations such as Foo.new. Don&#039;t feel that this is especially heavy compared to everything else in Ruby. What we must be careful with are implicit object allocations such as &quot;foo&quot; in a string.</description>
		<content:encoded><![CDATA[<p>I think there he is referring to explicit object allocations such as Foo.new. Don&#8217;t feel that this is especially heavy compared to everything else in Ruby. What we must be careful with are implicit object allocations such as &#8220;foo&#8221; in a string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Moore</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1233</link>
		<dc:creator>Mike Moore</dc:creator>
		<pubDate>Fri, 30 Jul 2010 20:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1233</guid>
		<description>I should add that he he was speaking about using Rails, not creating it. I look forward to Yehuda&#039;s response.</description>
		<content:encoded><![CDATA[<p>I should add that he he was speaking about using Rails, not creating it. I look forward to Yehuda&#8217;s response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Moore</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1232</link>
		<dc:creator>Mike Moore</dc:creator>
		<pubDate>Fri, 30 Jul 2010 19:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1232</guid>
		<description>FWIW, Yehuda downplayed concerns about object allocation at MountainWest RubyConf 2010, calling it &quot;essentially free&quot;. This is ~20:45 in the video.

http://mwrc2010.confreaks.com/2010-03-11-13-30-yehuda-katz-writing-modular-ruby-code-lessons-learned-from-rails.html</description>
		<content:encoded><![CDATA[<p>FWIW, Yehuda downplayed concerns about object allocation at MountainWest RubyConf 2010, calling it &#8220;essentially free&#8221;. This is ~20:45 in the video.</p>
<p><a href="http://mwrc2010.confreaks.com/2010-03-11-13-30-yehuda-katz-writing-modular-ruby-code-lessons-learned-from-rails.html" rel="nofollow">http://mwrc2010.confreaks.com/2010-03-11-13-30-yehuda-katz-writing-modular-ruby-code-lessons-learned-from-rails.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oldschool</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1229</link>
		<dc:creator>Oldschool</dc:creator>
		<pubDate>Fri, 30 Jul 2010 17:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1229</guid>
		<description>...  the key issue is that some libraries/frameworks allocate way too many objects ...

I *totally* disagree with this statement. A library should care about performance, usability, stability. Rails does a good job with that (talking about Rails 2.3 and greater). Maybe Rails does create a bunch of objects, but this does change the fact that the Ruby GC *sucks* and is *flawed*. Why do we have so many fixes (REE, Rubinius, ...)
What I don&#039;t get, is why all Rubists are so against the JVM. Before I hear the Java Dev argument again.  I was a Java Dev, but I am a Ruby Dev (only) for 4 years now. So I consider myself as a Rubist. I truly believe that the JVM/JRuby could be something really great for Ruby/Rails. It is the entry card in the enterprise level (some care about that and there is much money in it), it offers a very fast and mature platform, it is offers the chance to use many libraries like Apache Libs, Google Collections and so on. Why are we against it? Is it because it has the letter &quot;J&quot; in it? The only thing I can think of, are native bindings in Gems. With the help of the community this could be done quickly.

Another thing, as EngineYard took over JRuby, we can now be sure that JRuby has commercial support behind it and is developed by Ruby-understanders (love the word). So again my question: Why are Rubists against JRuby?</description>
		<content:encoded><![CDATA[<p>&#8230;  the key issue is that some libraries/frameworks allocate way too many objects &#8230;</p>
<p>I *totally* disagree with this statement. A library should care about performance, usability, stability. Rails does a good job with that (talking about Rails 2.3 and greater). Maybe Rails does create a bunch of objects, but this does change the fact that the Ruby GC *sucks* and is *flawed*. Why do we have so many fixes (REE, Rubinius, &#8230;)<br />
What I don&#8217;t get, is why all Rubists are so against the JVM. Before I hear the Java Dev argument again.  I was a Java Dev, but I am a Ruby Dev (only) for 4 years now. So I consider myself as a Rubist. I truly believe that the JVM/JRuby could be something really great for Ruby/Rails. It is the entry card in the enterprise level (some care about that and there is much money in it), it offers a very fast and mature platform, it is offers the chance to use many libraries like Apache Libs, Google Collections and so on. Why are we against it? Is it because it has the letter &#8220;J&#8221; in it? The only thing I can think of, are native bindings in Gems. With the help of the community this could be done quickly.</p>
<p>Another thing, as EngineYard took over JRuby, we can now be sure that JRuby has commercial support behind it and is developed by Ruby-understanders (love the word). So again my question: Why are Rubists against JRuby?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Aimonetti</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1226</link>
		<dc:creator>Matt Aimonetti</dc:creator>
		<pubDate>Fri, 30 Jul 2010 16:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1226</guid>
		<description>Not really, because of the performance issue caused by Rails3, it looks like the project I am working on will no longer run on Rails. I am still investigating but a switch to a pure rack stack or a Sinatra based solution is more probable. I believe  Aman Gupta is looking into it tho.</description>
		<content:encoded><![CDATA[<p>Not really, because of the performance issue caused by Rails3, it looks like the project I am working on will no longer run on Rails. I am still investigating but a switch to a pure rack stack or a Sinatra based solution is more probable. I believe  Aman Gupta is looking into it tho.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Aimonetti</title>
		<link>http://merbist.com/2010/07/29/object-allocation-why-you-should-care/comment-page-1/#comment-1225</link>
		<dc:creator>Matt Aimonetti</dc:creator>
		<pubDate>Fri, 30 Jul 2010 16:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=785#comment-1225</guid>
		<description>The GCStats is a rack middleware, so you need to tell your framework to use the middleware. For Rails, read http://guides.rubyonrails.org/rails_on_rack.html otherwise, you usually just need to require the file and add: &quot;use GCStats&quot; to your rackup file. (usuallly called config.ru)</description>
		<content:encoded><![CDATA[<p>The GCStats is a rack middleware, so you need to tell your framework to use the middleware. For Rails, read <a href="http://guides.rubyonrails.org/rails_on_rack.html" rel="nofollow">http://guides.rubyonrails.org/rails_on_rack.html</a> otherwise, you usually just need to require the file and add: &#8220;use GCStats&#8221; to your rackup file. (usuallly called config.ru)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

