Archive for May, 2009

Easy Rider… ohne Stützen!

May 20th, 2009

tobi-radln-DSC_0055.jpgHartes Training mit dem Laufrad führte nun zu einem etwas früher als geplanten Tag “X”. Die Stützen dürfen den Drahtesel verlassen und auf ewig in den Tiefen eines häuslichen Kellers abtauchen. Obgleich die Anspannung die Freude auf den ersten Metern noch etwas überwogen hat, war es ein einzigartiges Ereignis. Raufsetzen, halten, treten… und .. es fährt… es fährt!…

Bremsen hat gottseidank auch funktioniert und somit hat der Tag in Laxenburg auf dem Rad auch keine Blessuren gebracht, sondern nur viel Selbstvertrauen. (Ja wir hoffen auch, dass die schulische Karriere mit der gleichen Ambition umgesetzt wird)

Add benchmarking tests to MooseX::Log::Log4perl to verify overhead

May 20th, 2009

After a while I had the chance to get back to MooseX::Log::Log4perl, which is Role (based on Moose) that can be easily reused in classes requiring logging functionality.

While it is really simple to use, I still found myself often directly using the default logger approach by creating a class variable and using that. So instead of:

use Moose;
with MooseX::Log::Log4perl;
sub whatever {
    my $self = shift;
    $self->log->debug("Here I am") if $self->log->is_debug;
}

mostly the direct logger was used in the classes.

   
use Log::Log4perl;
use vars qw($log);
$log = Log::Log4perl->get_logger(__PACKAGE__);
sub whatever {
    my $self = shift;
    $log->debug("Here I am") if $log->is_debug;
}

One reason was that during that time I optimized for speed and found a hotspot to be the additional method call for the “log” method. As perl has some overhead in calling functions, this still holds true to some extend, so that’s why I added a benchmarking test to the testsuite of MooseX::Log::Log4perl.

So if you have the chance, I’d like to see if in your test environment still the performance limits (keep overhead lower than 5% compared to using Log::Log4perl directly). To run the test simply get the sources and run the test.

cpan> look MooseX::Log::Log4perl
shell# TEST_MAINT=1 prove -l -v t/99_bench.t
t/99bench.t .. 
1..6
ok 1 - Bench instance for MooseX::Log::Log4perl isa BenchMooseXLogLog4perl
ok 2 - Bench instance for Log::Log4perl isa BenchLogLog4perl
                     Rate MooseX-L4p log MooseX-L4p logger Log4perl method Log4perl direct
MooseX-L4p log    21235/s             --               -0%             -4%             -6%
MooseX-L4p logger 21273/s             0%                --             -4%             -6%
Log4perl method   22102/s             4%                4%              --             -2%
Log4perl direct   22535/s             6%                6%              2%              --
...

If all tests pass you stayed within the limits (around 95% compared to using Log4perl directly). I’d like to see your results. So please comment on it and add the comparison table to it.

Browsers benchmarked on Linux

May 13th, 2009

The system itself is a Dell D830 laptop with a nvidia NV135 chip and an Intel Core2 Duo T7500 CPU with 2GB RAM. For actual benchmarking the new futuremark paecekeeper browser benchmark has been put to use.

The compared browsers are:

  • Midori 0.1.4 (lightweight GTK browser using webkit)
  • Iceweasel 3.0.9 (the debian rebranded Firefox 3.0.9)
  • FIrefox 3.5b4 (latest beta of firefox 3.5)

Sunspider results are:

RESULTS (means and 95% confidence intervals) for SunSpider 0.9
--------------------------------------------
Firefox 3.5b4:               2405.6ms +/- 4.0%
Midori 0.1.4:                3917.2ms +/- 2.6%
Iceweasel 3.0.9:             4465.6ms +/- 1.6%

Here are the results for the Futuremark Peacekeeper browser benchmark:
browser-bench-midori-014browser-bench-firefox-35b4browser-bench-iceweasel-309

The results are quite unexpected, as working with the browser show a different perceived quality. Although midori scores highest in the peacekeeper benchmark, the rendering on some sites is sometimes flaky and seem to take longer as with both firefox version. On the other hand the sunspider benchmark shows midori far behind firefox, which also is strange as SunSpider is from the webkit project and should therefor be quite fast on a browser using webkit.

Easy Rider… ohne Stützen!

May 11th, 2009

tobi-radln-DSC_0055.jpgHartes Training mit dem Laufrad führte nun zu einem etwas früher als geplanten Tag “X”. Die Stützen dürfen den Drahtesel verlassen und auf ewig in den Tiefen eines häuslichen Kellers abtauchen. Obgleich die Anspannung die Freude auf den ersten Metern noch etwas überwogen hat, war es ein einzigartiges Ereignis. Raufsetzen, halten, treten… und .. es fährt… es fährt!…

Bremsen hat gottseidank auch funktioniert und somit hat der Tag in Laxenburg auf dem Rad auch keine Blessuren gebracht, sondern nur viel Selbstvertrauen. (Ja wir hoffen auch, dass die schulische Karriere mit der gleichen Ambition umgesetzt wird)

primary