Jan 19, 2009

symfony's image_tag(): Handle With Care

Turns out, symfony's image_tag() helper is a sucker for memory.

It takes more than 34 megabytes of memory to render a page displaying a list of about 500 rows, each accompanied by a set of four or five icons, each icon's <img> tag created by image_tag() helper, with additional parameters provided like this:

image_tag("some_image.png", "alt=Lovely, title=Rita")

With those images coded explicitly, rendering takes just 8.5MB. A leak, maybe?

Jan 9, 2009

Pidgin's “New IM” Tray Icon

I think Pidgin is really one of the best-designed applications for GNOME. It almost looks like its interface was done by Google: nothing extra, just what you need to send and recieve messages. No bluish colours though.

However, I was a bit surprised once, when changing DPI resolution of the system also changed the Pidgin's tray icon for new instant message from original to a smiley: . I actually connected those two events later, when I've found out that Pidgin uses four different sets of tray icons to suit the height of the tray panel.

Those are stored in /usr/share/pixmaps/pidgin/tray in four different folders related to the size of the icons. Turns out, the tray-new-im.png icon in 22x22 folder is different from icons in three other folders. There's actually a confirmed bug for that. But wait, it goes further.

Not only the 22x22 icon has a smiley instead of an orange dialogue-box, also «speech box part of tray-message.png is white, instead of having a bluish gradient like the others in 22”. That'd probably be okay with me if it was about an icon in some messy has-version-for-every-os java application like Azureus, but since we're talking about spotless purity of GNOME native app, that's truly an outrage.

Luckily for everyone, Linux has a very simple way to fix this. Just save an icon from the bug page (or you can use the one from the above, they are identical), and replace the one in /usr/share/pixmaps/pidgin/tray/22x22 with it.

Now you're good to go (well, except for the tray-message.png).