HTTP::Request & Friends Too Memory-Happy

Now that my maps and all the supporting vector space data is getting larger, I noticed that HTTP::Request (as well as HTTP::Response) are not overly economic when it comes to memory usage.

The Problem Definition

Let us look at the following code

Posted In

DeepZoom: new Graphics::DZI release

There are two major additions:

  • The first allows you to use a whole image stack as canvas for your image pyramid.
  • The other provides you with a more convenient and shorter way where things are supposed to be stored.

Image Stacks

The amazing Image::Magick package can cope with images which are linked together:

use Image::Magick;
my $image = Image::Magick->new;

If you resiz

Posted In

Wolf in Sheep's Clothings (Part IV)

(continued from part III)

Over the last year I had hardly time to advance my Perl client to the AllegroGraph tuple server. Which is a shame, as it is fun to take the existing REST interface and to offer it in a perlish mindset.

So when the Perl hackathon (report) was in Vienna these days, and coincidentally also the RDF Perl hackathon Geilo next week, I thought I should use the opportunity to a rub shoulders with the Perl illuminaries, at least for half a day. But when I arrived, everyone was already in deep hacking mode, so I had no excuse but to do programming myself.

Posted In

Perl TM 1.47 Maintenance Release

Since the last release there have been a few smaller additions, such as

  • an neighborhood functionality into TM::Graph.

Both I need for the map visualisation toolchain.

I also fixed some problems when using maps with the MLDBM backend.

Posted In

Module::Build Double::Plus::Good

For my latest Perl projects I have switched from ExtUtils::MakeMaker with its Makefile.PL to Module::Build.

So far I have been using it quite naively, but this time I had special requirements:

I am packaging a server (TM::IP), so there are not only Perl packages and a client-side script (ts), but also the daemon code and the configuration files:

Posted In

DeepZoom (Part II): The Graphics::DZI API

(continued from Part I)

When you need to integrate the generation of DZI image pyramids into your own infrastructure, you should look first at Graphics::DZI::Files and not its superclass Graphics::DZI.

The Conventional Use Case

Objects of this class expect foremost the image to be tiled:

use Graphics::DZI::Files;
my $dzi = new Graphics::DZI::Files (image => $image);

As detailed in the manual page, you can add more parameters, such as tile size or the format.

Posted In

Graphics::DZI Developer Release

This weekend I managed to package up Graphics::DZI. It is a naive implementation of the DeepZoom mechanism as used in Seadragon.

The API is not completely stable; first I will have to integrate the piece into my semantic map generation infrastructure.

I also need to better understand how to deal with very sparse maps.

Posted In

Only a Ubuntu User is a Happy OSX User

I own my MacBook now for a year, having been convinced by a friend. He - like me - had become tired of fiddling around with kismet and iwconfig just to make networking work at this conference, or at that meeting.

Posted In

RDF::SKOS Developer Release

This weekend I delivered on my threat to post RDF::SKOS onto CPAN.

It is a developer version, as I still have to fathom out a proper API to deal with this.

Posted In

Perl TM 1.46 Maintenance Release

Recently the Perl TM package has started to experience some problems with smoke testing together with some Perl releases.

As I do not have the time to track this down properly, I simply take this opportunity to remove the complete TMQL support, just to factor this into my private implementation.

Version 1.46 is on its way into CPAN.

Posted In


This weekend I have commenced work on RDF::SKOS.

As most of you know, many have observed this before and larsbot has blogged about it in the past, SKOS is strikingly similar to Topic Maps, although in detail its semantics is much more limited. Interesting from a standards-political point of view.

There is yet no Perl coverage on CPAN. That has to change.

Posted In

Storable excessive memory usage?

Before I submit a bug report , has anyone observed the memory usage pattern of Storable?

What Happens?

First I create a hash with 30 megs of memory:

my $s   = 'x' x 1000000;
my %res = map { $_ => $s } 1..30;

having afterwards a process (virtual) size of ~50 MB.

Then I use Storable to freeze that:

use Storable qw(freeze);
warn "size: ".length (freeze (\%res));

Even though

Posted In

IO::Lambda: One Wait At A Time (Part I)

On CPAN there are few options for reactive, event-driven programming, POE being just the most prominent one.

One hidden gem in this category is IO::Lambda. Given that it uses strongly a functional paradigm and continuations it will probably alienate most procedurally wired brains. The documentation and the examples are rich, but that itself presents a high entrance barrier.

Posted In

Perl Idea: GearmanX::Worker

I am now in the process to move a number of CPU intensive jobs into Gearman workers.

What Is

Unfortuntely, the required boilerplate code for that is quite crufty:

First, inside your workers you are supposed to do this:

use Gearman::Worker;
my $worker = Gearman::Worker->new;

That object is not what it appears to be. It is not a worker, but actually the handle to the job server.

Posted In

Perl Police: Developer On The Run (Graph::Bipartite)

Ok, here is my new MO (method of operation):

Whenever I see an awful piece of Perl (even if only a 0.01 version and especially if it is on CPAN), then I analyze it thoroughly, write the developer an email with my findings. And wait for a response.
After 3 emails without response, I rat out the module to the Perl Police. Even if it is a 0.01 version and especially if it is on CPAN.
Posted In