<?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: Slim-Attributes v0.5.0 released</title>
	<atom:link href="http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/</link>
	<description>A blog about Ruby, Rails and other tech.  Mostly.</description>
	<lastBuildDate>Thu, 02 Sep 2010 19:56:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stephen Sykes</title>
		<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/comment-page-1/#comment-495</link>
		<dc:creator>Stephen Sykes</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://pennysmalls.com/?p=31#comment-495</guid>
		<description>bgates: Sorry I do not know enough about compiling ruby and extensions for it under windows.
If there is anyone who can successfully compile slim_attributes for windows then I would happily host it / link to it.</description>
		<content:encoded><![CDATA[<p>bgates: Sorry I do not know enough about compiling ruby and extensions for it under windows.<br />
If there is anyone who can successfully compile slim_attributes for windows then I would happily host it / link to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bgates</title>
		<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/comment-page-1/#comment-494</link>
		<dc:creator>bgates</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://pennysmalls.com/?p=31#comment-494</guid>
		<description>Do you know what the proper config options are to install this under Windows? I know you got extconf.rb from the mysql gem, and it seems the best solution for that gem for Windows is to get a pre-compiled version.
The error I&#039;m getting is 
checking for main() in libmysql.lib... no
I&#039;d appreciate any ideas on how to solve this.</description>
		<content:encoded><![CDATA[<p>Do you know what the proper config options are to install this under Windows? I know you got extconf.rb from the mysql gem, and it seems the best solution for that gem for Windows is to get a pre-compiled version.<br />
The error I&#8217;m getting is<br />
checking for main() in libmysql.lib&#8230; no<br />
I&#8217;d appreciate any ideas on how to solve this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Sykes</title>
		<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/comment-page-1/#comment-464</link>
		<dc:creator>Stephen Sykes</dc:creator>
		<pubDate>Thu, 23 Oct 2008 14:03:52 +0000</pubDate>
		<guid isPermaLink="false">http://pennysmalls.com/?p=31#comment-464</guid>
		<description>The idea would be to save on copying the data out of the mysql result object, and to instantiate model attributes only when you need them directly from the result.  I&#039;ll try to get a benchmark from my experimental code to see if there&#039;s much benefit (it currently segfaults :-(  ).
By the way, it doesn&#039;t matter if you examine a row or not - the point is that only those attributes you need from any row are ever copied out of the mysql result data.

I have looked at Query memcached - as it stands it is incompatible with slim_attributes because it needs to serialise all the data to memcached which ends up instantiating all the attributes.  Might be worth looking at inventing a compatible query cache though.

Perhaps there are other areas that can be improved in AR, and profiling it may be worthwhile.  I suspect that the speed improvement we have seen in slim-attributes by not instantiating all those ruby objects is probably the biggest improvement that can be made in a fairly simple way.</description>
		<content:encoded><![CDATA[<p>The idea would be to save on copying the data out of the mysql result object, and to instantiate model attributes only when you need them directly from the result.  I&#8217;ll try to get a benchmark from my experimental code to see if there&#8217;s much benefit (it currently segfaults :-(  ).<br />
By the way, it doesn&#8217;t matter if you examine a row or not &#8211; the point is that only those attributes you need from any row are ever copied out of the mysql result data.</p>
<p>I have looked at Query memcached &#8211; as it stands it is incompatible with slim_attributes because it needs to serialise all the data to memcached which ends up instantiating all the attributes.  Might be worth looking at inventing a compatible query cache though.</p>
<p>Perhaps there are other areas that can be improved in AR, and profiling it may be worthwhile.  I suspect that the speed improvement we have seen in slim-attributes by not instantiating all those ruby objects is probably the biggest improvement that can be made in a fairly simple way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roger</title>
		<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/comment-page-1/#comment-461</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Thu, 23 Oct 2008 13:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://pennysmalls.com/?p=31#comment-461</guid>
		<description>Yeah lourens&#039; branch of mysqlplus has an on off switch for the auto-gc.

re: further speculation--that&#039;s an interesting idea.  I&#039;m not sure how often you end up never examining a row of a query, though.

One interesting idea would be to keep the all_hashes result around and re-use it if the DB hasn&#039;t changed [kind of like http://www.inwebwetrust.net/post/2008/09/08/query-memcached without the memcache storage part--just the memcached &#039;last updated at per table&#039; algorithm].

That said, as you mentioned previously, I fear that DB retrieval of objects is not the largest bottleneck in AR [though this plugin alleviates it greatly].  Haven&#039;t done much profiling of it, though--I could be wrong.

That being said if that&#039;s not the bottleneck then what is?

Cheers!
-=R</description>
		<content:encoded><![CDATA[<p>Yeah lourens&#8217; branch of mysqlplus has an on off switch for the auto-gc.</p>
<p>re: further speculation&#8211;that&#8217;s an interesting idea.  I&#8217;m not sure how often you end up never examining a row of a query, though.</p>
<p>One interesting idea would be to keep the all_hashes result around and re-use it if the DB hasn&#8217;t changed [kind of like <a href="http://www.inwebwetrust.net/post/2008/09/08/query-memcached" rel="nofollow">http://www.inwebwetrust.net/post/2008/09/08/query-memcached</a> without the memcache storage part--just the memcached 'last updated at per table' algorithm].</p>
<p>That said, as you mentioned previously, I fear that DB retrieval of objects is not the largest bottleneck in AR [though this plugin alleviates it greatly].  Haven&#8217;t done much profiling of it, though&#8211;I could be wrong.</p>
<p>That being said if that&#8217;s not the bottleneck then what is?</p>
<p>Cheers!<br />
-=R</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lourens Naudé</title>
		<link>http://pennysmalls.com/2008/10/14/slim-attributes-v050-released/comment-page-1/#comment-366</link>
		<dc:creator>Lourens Naudé</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://pennysmalls.com/?p=31#comment-366</guid>
		<description>Great work with this!

The forced GC of mysql-ruby is a royal pain, performance wise and I imagine it being a killer for intense Rails actions, which basically implies a forced GC every 2 requests should the action render with 10 odd queries. 

We&#039;re playing with disabling the 20 result forced GC functionality with this branch of mysqlplus :

http://github.com/oldmoe/mysqlplus/tree/with_async_validation

Benchmark script available here :

http://github.com/oldmoe/mysqlplus/tree/e81e145c15e693850dd6180ae6547ae74068a6eb/test/gc_benchmark.rb

The pattern has been a 100%+ performance increase on 1.8 and little to no difference on 1.9

- Lourens</description>
		<content:encoded><![CDATA[<p>Great work with this!</p>
<p>The forced GC of mysql-ruby is a royal pain, performance wise and I imagine it being a killer for intense Rails actions, which basically implies a forced GC every 2 requests should the action render with 10 odd queries. </p>
<p>We&#8217;re playing with disabling the 20 result forced GC functionality with this branch of mysqlplus :</p>
<p><a href="http://github.com/oldmoe/mysqlplus/tree/with_async_validation" rel="nofollow">http://github.com/oldmoe/mysqlplus/tree/with_async_validation</a></p>
<p>Benchmark script available here :</p>
<p><a href="http://github.com/oldmoe/mysqlplus/tree/e81e145c15e693850dd6180ae6547ae74068a6eb/test/gc_benchmark.rb" rel="nofollow">http://github.com/oldmoe/mysqlplus/tree/e81e145c15e693850dd6180ae6547ae74068a6eb/test/gc_benchmark.rb</a></p>
<p>The pattern has been a 100%+ performance increase on 1.8 and little to no difference on 1.9</p>
<p>- Lourens</p>
]]></content:encoded>
	</item>
</channel>
</rss>
