A notch above a monkey

Speed test of PyRSS2Gen, kid and atomixlib

I’ve spent this evening building RSS2 and Atom feeds with PyRSS2Gen , kid and atomixlib , as proposed by helpful people few days ago.

We’d like to add feeds promiscuously to our service (right now we have exactly one). But before we can decide how to tackle this, we need to know how fast we can generate a feed on average.

DISCLAIMER: I tried to generate feeds with same data using what seemed a reasonable python code to do so, but I didn’t try to save every millisecond as I only cared about crude speed approximations. I have no problem believing that someone else might get completely different results. No serious statistical analysis has been made and rigorous scientific approach has been almost completely absent. Better make your own tests, if speed (or anything else really) is important to you. But if dubious numbers delight you, then please continue.

So, here are my results. Time to generate a feed with 10 entries on 1GHz G4 Powerbook:

  • with PyRSS2Gen somewhere around 70ms
  • with atomixlib around 120-140ms
  • and with kid around 30-35ms

In other words, you can generate between 8 and 30 feeds per second on my notebook and (I guess) 2-3x as many on a modern server. This is more than enough for most cases, but I’m afraid it probably won’t be enough for us. Which means either producing feeds by gluing strings together or having a more intelligent approach than building a new one on every request.

As a side note, I found all three packages easy to work with.

Update: Sylvain has released atomixlib 0.3 which makes it even easier to create atom feeds and brings also significant speed improvements. On my computer it takes now around 60-65ms to build a feed.

Another update: I made a couple of quick tests with mixed results on fairly new Opteron server. PyRSS2Gen was actually slower with 80-85ms and I have no idea why. kid was blazing fast with times between 8 and 9ms. Definitely good enough.

But I couldn’t get atomixlib to work, because 4Suite failed to build, so it will have to wait until I can figure out why it chokes on a perfectly legitimate XSLT.

Update 3: 4Suite has been promptly fixed (thanks!) and atomixlib 0.3 takes now 18-19ms. I believe this is an excellent time.

Community development

I’m online again and have been reading news of the last few days. So I’m kind of late to discussion about friendliness of communities.

My personal experience with Python community has been absolutely wonderful. I’ve written posts that could be seen as inflammatory, but the response I’ve got was just amazing. I haven’t been nailed to the cross for it and have learned a lot from people I admire, who took the time to leave a comment on my blog for which I’m really grateful. A couple of days ago I needed help developing atom feeds and got it immediately.

I find Python community very friendly and forthcoming, but I also believe Ian is right that Ruby might feel more friendly simply because a kind of youthful innocence. I wouldn’t really know, since I don’t use the language or follow up their discussions. I have however experienced in other communities the problem of a disconnect between old timers and newer members, who don’t share cultural history just yet. I think this is inevitable, since experience unlike knowledge can’t be easily given.

On the other hand, I have a different problem with web related talks we’re organizing. It’s been our goal from the start to use talks as a conduit for slovenian web community building, which hasn’t happened to the extent I was hoping for. Our talks are well attended, but at the end our audience mostly leaves, which kind of saddens me. I’d like to get them more engaged, but I have no idea if the problem lies with us, organizers, or is just a result of slovenian culture.

I guess community building is just hard.

Searching for an Atom feed generator

I’m still mostly offline, but luckily UMTS offers a sort of solution. It works alright, but it is fairly expensive and I’m counting my bytes again. Still better than helplessly and hopelessly waiting for local telecom to fix ADSL, which judging by previous experience may happen who knows when.

I’ve been looking for an Atom feed generator and I can’t find anything more than a few exploratory hacks. Is there something out there that would at least resemble PyRSS2Gen ?

What I’d like is something that returns a proper Atom 1.0 feed and doesn’t choke on non-ascii using languages. I’m sure I’m missing something. Any help would be greatly appreciated.