Hi, I wanted to speed up the image menu (and all other menus because they show images, too). That's what I found out:
pygame is slow when reading png or jpg files. PIL is faster, but transforming PIL images to pygame images is also slow. Right now, we use png to store our thumbnails. For an example file, the cachefile has the size of 70322 Bytes. Using jpg as cache is a little bit slower (but not much), the size is 2827 Bytes. We could save disc space by using jpg. But still, the speed is awful. But we could save the raw image of the thumbnail using cPickle[1]. This size is now 216026 Bytes. It's about three times the size we use now, but it's much faster, much?, no very much! In my test folder I needed about 5 secs to enter with png or jpg, now it's only 1 sec and this sec is used by the mmpython cache. Question: how important is the usage of three times the space? I vote for raw data. Dischi Footnotes: [1] BTW, our use of cPickle is wrong. 1. we give cPickle open(..) as argument ... noone closes this anywhere. 2. cPickle has an optional argument TRUE/FALSE if cPickle should use binary caching. This is a. faster and b. it uses less disc space. I wrote util.read_pickle and util.save_pickle as wrapper. Please use that. -- C.O.B.O.L - Completely Obsolete Boring Old Language. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel