This Time Self-Hosted
dark mode light mode Search

If there was a “Most Useless Free Software Developer Award”…

… I would have won it many times.

So, yesterday I was so happy around to have removed 10MiB and 300KiB of memory waste from picoxine, that I gone a step further, and worked on supporting mmap-ed (memory mapped) files input in xine. What I hoped was to not having to read the file by hand piece by piece, but rather pass the whole mmap to the decoder and be done with it.

I worked on it and I was able to get something usable, after a while, but… the block reading does not work as I hoped, it works only for MPEG TS, thus breaks for anything but FLAC (I’m not sure why, to be honest).

At the end, the MMAP implementation is in xine-lib, it does not have any regression, up to now, but it’s not the improvement I hoped, either. Right now instead of read() calls you have memcpy() calls that copies from the MMAP the data for the decoder to parse, it’s still a good waste of memory I’m afraid.

Another problem are the buffers used for the audio decoding, that I’m not sure how are well reused and freed and so on, unfortunately from picoxine I cannot play more than one file with a time between them, and I cannot get an useful massif output from Amarok, because QImage::create() seems to do some spikes of memory usage which reduce the scale of the graph. By the way: such impressive usage of memory seems to really be one of the causes for which Konqueror and similar are slow; I haven’t looked up Qt’s sources, but likely if you can reduce the memory usage of QImage::create(), KDE would be quite faster.

Last night I also tried to implement new rtp/rtsp support through lu_zero’s library, but resulted in a moot point that I will probably never be able to get something useful from, like for the WavPack decoder … sigh, I should probably give up on adding more stuff and just think of doing the little tweaks that gives you 300KiB out of 200..

I’m depressing myself thinking of how many useless project I started, I continued with eager of preparing something useful, and now are there waiting for something, probably their death. Stuff like rubytag++ is in my GIT repository bitrotting, as the original library itself (TagLib) had enough holes to make my bindings useless for what I hoped to do, and upstream seems not to care at all (I still haven’t received any reply from Wheeler, to my many bug reports and considerations); ruby-hunspell is probably a lost cause, too, as the unicode conversion thing I’m still unable to find a way to bind; gitarella is there, I cannot continue it alone, because I have not enough time, and there is still lots of stuff to add; KDigest in Ruby is still incomplete, I forgot why in the first place now…

Okay, better not to think of the failures, at least I can be proud of my ebuilds 🙂

Comments 2
  1. Hey now, I don’t think you’re doing useless work. Maybe what you’re doing is not immediately useful to anyone, but it does inspire me to do more work with free software. I think that the inspiration is very useful.On that note, I enjoy packaging, so perhaps I’ll go read through all of the ebuild docs and submit some ebuilds :)Thanks Diego!

  2. Thank you for this compliment 🙂 And I’m glad I can help someone with what I do. If it wasn’t for people like you I would have probably given up already years ago, on development 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.