<?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"
	>
<channel>
	<title>Comments on: Lourens Naudé on the Best ActiveRecord and Fragment Cache Store</title>
	<atom:link href="http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/feed/" rel="self" type="application/rss+xml" />
	<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/</link>
	<description>Random musings on Webapps.</description>
	<pubDate>Tue, 14 Oct 2008 13:22:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Lourens</title>
		<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-8</link>
		<dc:creator>Lourens</dc:creator>
		<pubDate>Wed, 20 Dec 2006 07:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-8</guid>
		<description>Oliver,

I think AR slowness is inherited by the language, more specific Garbage Collection.Depending on the size of the result set, there's a good chance Garbage Collection could be triggered after conversion of raw result to AR objects.

http://beaver.net/slides/ruby/ruby-gc-slides.pdf

http://seattlerb.rubyforge.org/mem_inspect/

Complex joins is catch 22 ground.Object caching (memcached) just unmarshals the AR object and is unlike to trigger GC as often, but is only well suited for single row queries or the odd couple of rows.Fetching via AR would likely trigger GC in a scenario where one Mongrel/FCGI processes the same db intensive (multiple joins etc. ) action at regular intervals. 

The performance difference between Model.find_by_sql ( conversion to AR object ) and Model.connection.execute ( raw MySQL result ) is also significant.

Applying http://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage to latest ruby-mysql tarball ( requires MySQL devel libs &#62;= 5.0.27 ) would also cut down on large JOIN retrieval.

But of course, none of the above would yield native C performance :-)</description>
		<content:encoded><![CDATA[<p>Oliver,</p>
<p>I think AR slowness is inherited by the language, more specific Garbage Collection.Depending on the size of the result set, there&#8217;s a good chance Garbage Collection could be triggered after conversion of raw result to AR objects.</p>
<p><a href="http://beaver.net/slides/ruby/ruby-gc-slides.pdf" rel="nofollow">http://beaver.net/slides/ruby/ruby-gc-slides.pdf</a></p>
<p><a href="http://seattlerb.rubyforge.org/mem_inspect/" rel="nofollow">http://seattlerb.rubyforge.org/mem_inspect/</a></p>
<p>Complex joins is catch 22 ground.Object caching (memcached) just unmarshals the AR object and is unlike to trigger GC as often, but is only well suited for single row queries or the odd couple of rows.Fetching via AR would likely trigger GC in a scenario where one Mongrel/FCGI processes the same db intensive (multiple joins etc. ) action at regular intervals. </p>
<p>The performance difference between Model.find_by_sql ( conversion to AR object ) and Model.connection.execute ( raw MySQL result ) is also significant.</p>
<p>Applying <a href="http://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage" rel="nofollow">http://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage</a> to latest ruby-mysql tarball ( requires MySQL devel libs &gt;= 5.0.27 ) would also cut down on large JOIN retrieval.</p>
<p>But of course, none of the above would yield native C performance <img src='http://onwebapps.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Oliver</title>
		<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-7</link>
		<dc:creator>Robert Oliver</dc:creator>
		<pubDate>Wed, 20 Dec 2006 04:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-7</guid>
		<description>We used the regular mysql.h code.

We just did mysql queries.  I tried it first with MySQL++, but the speed of that isn't much better than AR.

I would share the code but it is a closed source project.</description>
		<content:encoded><![CDATA[<p>We used the regular mysql.h code.</p>
<p>We just did mysql queries.  I tried it first with MySQL++, but the speed of that isn&#8217;t much better than AR.</p>
<p>I would share the code but it is a closed source project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shanti Braford</title>
		<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-6</link>
		<dc:creator>Shanti Braford</dc:creator>
		<pubDate>Wed, 20 Dec 2006 04:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-6</guid>
		<description>Robert,

I'd love to see how you implemented the C version.

- Shanti</description>
		<content:encoded><![CDATA[<p>Robert,</p>
<p>I&#8217;d love to see how you implemented the C version.</p>
<p>- Shanti</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Oliver</title>
		<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-5</link>
		<dc:creator>Robert Oliver</dc:creator>
		<pubDate>Tue, 19 Dec 2006 21:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-5</guid>
		<description>Good information Lourens!  We definitely took some different routes in our analysis.

You know, ActiveRecord, as great as it is, can't be tweaked much.  In our experience, if you need intensive DB work on the backend, don't expect AR to come to the rescue.  Sure, it's great for the front end, but is painfully slow on the backend.

I recently tweaked a project I was working on by writing a plain ol'e C app to do backend processing.  I was able to take a 13 second SELECT (complicated join) with AR and turn it into a 1 sec tight loop with C.  Got the same work done.

Sure it was more lines of code, but if you need intensive backend processing, AR isn't up to the task, yet.

I'll be posting some more detailed benchmarks on my site soon.</description>
		<content:encoded><![CDATA[<p>Good information Lourens!  We definitely took some different routes in our analysis.</p>
<p>You know, ActiveRecord, as great as it is, can&#8217;t be tweaked much.  In our experience, if you need intensive DB work on the backend, don&#8217;t expect AR to come to the rescue.  Sure, it&#8217;s great for the front end, but is painfully slow on the backend.</p>
<p>I recently tweaked a project I was working on by writing a plain ol&#8217;e C app to do backend processing.  I was able to take a 13 second SELECT (complicated join) with AR and turn it into a 1 sec tight loop with C.  Got the same work done.</p>
<p>Sure it was more lines of code, but if you need intensive backend processing, AR isn&#8217;t up to the task, yet.</p>
<p>I&#8217;ll be posting some more detailed benchmarks on my site soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: On Web Apps &#187; Blog Archive &#187; Wisdom of Rails Wizards Study in Best ActiveRecord and Fragment Caching Store</title>
		<link>http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-3</link>
		<dc:creator>On Web Apps &#187; Blog Archive &#187; Wisdom of Rails Wizards Study in Best ActiveRecord and Fragment Caching Store</dc:creator>
		<pubDate>Tue, 19 Dec 2006 12:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://onwebapps.com/lourens-naude-on-the-best-activerecord-and-fragment-cache-store/#comment-3</guid>
		<description>[...] Lourens Naudé [...]</description>
		<content:encoded><![CDATA[<p>[...] Lourens Naudé [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
