Yeah I'm still scratching my head as to why they do that. Huh? Is it
so that just in case you use .query_with_result = false and don't call
.free it will free for you? I'd be in favor of taking it totally out
:) [or maybe a variable that you can set to 0 if you want it to never
call gc arbitrarily].
> The only benefit a render pipeline would have is to eliminate DB latency as
> no matter how hard one tries
> to keep DB in the controller, from time to time a belongs to reference on a
> record being rendered eg. in a loop
> still fires, and essentially blocks the rendering process.
interesting.
-=R
macbook-pros-computer:mysqlplus lourens$ ruby test/gc_benchmark.rb
user system total real
With GC 0.820000 0.040000 0.860000 ( 1.207480)
Without GC 0.060000 0.040000 0.100000 ( 0.427468)
http://github.com/oldmoe/mysqlplus/commit/35d2545c17f385a9cf524bfea39606524d75c009
on branch http://github.com/oldmoe/mysqlplus/commits/with_async_validation
Aman
Haven't measured it yet - have a patched local Ruby able to measure GC
collections, but currently still enjoying a flying
fixture based test suite for a refreshing change.
Will look into it in a bit.
I'd still be in favor of defaulting it to never GC :)
@Lourens: re tests. If you were to run those tests within a rails
console the difference might be a lot higher [but it's good to note
that it's already faster]. I know the GC is more efficient in 1.9 [1]
but still a big issue.
Thanks!
-=R
[1] http://markmail.org/message/shwolvhhgfjvzxlo
Also note that the with_async_validation branch still errs on transactions :)
--
Thanks!
-=R