Mailinglist Archive: opensuse-ruby (32 mails)
| < Previous | Next > |
Re: [opensuse-ruby] rails 3 performance
- From: Stephan Kulow <coolo@xxxxxxx>
- Date: Tue, 20 Mar 2012 16:12:12 +0100
- Message-id: <4F689E4C.4090408@suse.de>
On 20.03.2012 14:17, Stephan Kulow wrote:
As expected, a GC.disable before the test "improves" performance
GC.disable:
0.258863653 0.552205324
normal with GC
0.579500092 1.455681835
now on to C on rails :)
Greetings, Stephan
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-ruby+owner@xxxxxxxxxxxx
On 20.03.2012 14:06, Josef Reidinger wrote:
On Tue, 20 Mar 2012 14:00:17 +0100Between the runs I only switch branch, both are working against the same
Stephan Kulow <coolo@xxxxxxx> wrote:
Hi,
Now that I have the initial port of obs api to rails 3 finished, I
consider staying forever on rails2 :)
I have this little benchmark that I initially wrote to check if it's
worth talking to the API in json instead of the usual XML:
Usually using different xml implementation then rexml in rails help a lot.
prjs = DbProject.find :all
x = Benchmark.realtime { prjs.each { |p| p.expand_flags.to_json } }
y = Benchmark.realtime { prjs.each { |p| p.to_axml('flagdetails') }
puts "#{x} #{y}"
And indeed with rails 2.3.14, it shows json is good:
0.108472093 0.379935258
But now with rails 3.2.1 both are slower ;(
0.515888469 1.334631859
Interesting, I think this deserve investigation why it is.
Do you have identic scenario? Could you profile run?
set of fixtures against the same database.
Attached are two perftools pictures - the rails32 sample has 62% GC,
which appears like madness to me.
As expected, a GC.disable before the test "improves" performance
GC.disable:
0.258863653 0.552205324
normal with GC
0.579500092 1.455681835
now on to C on rails :)
Greetings, Stephan
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-ruby+owner@xxxxxxxxxxxx
| < Previous | Next > |