You are here: Home » Reply

Reply To: performance differences between itunes and nslu2



Ok, I compared 🙂 I measured each one ten times to get an average:

With svn-1498 & sqlite3, accessing 20k songs took 1:42.
With 0.2.4 & gdbm, accessing 20k songs took 0:28.

Would have tried svn-1498 with gdbm, but sadly the new configure requires me to use either –enable-sqlite or –enable-sqlite3 and doesn’t accept just –enable-gdbm, and the config file doesn’t allow it either.

But this difference is even more than 1:3!

And yes, you’re right about that “disk-backed memory”.

In Pascal, which I use mostly on Win & Linux (well on the Mac as well *g*), I would just implement the response building with a TStream, and initialize that based on free memory as either TMemoryStream or TFileStream. Firefly is not OO though, C instead of C++, if I remember browsing some code files correctly? I’m not that good at C, but I think even using just a file while building any request (including seeking and all -3 seconds maybe) would be faster than browsing the DB multiple times (-70 seconds measured, maybe -60 if you include the difference between gdbm and sqlite3).