Hi, It's been about a month and a half since I started working on S4 and I guess most of you haven't heard much (unless you've been following the git commit log) so here's a quick status report.
Backend: The S4-code is mostly done and working. I guess it could need some cleanup and commenting (especially the B+ tree code) but I most of the code is in place. Integration: Inserting S4 instead of SQlite actually went quite smoothly. Mostly it was a matter of removing medialib_begin/end calls. The collections were also stored in the medialib, but I rewrote that so they are saved to {config_dir}/collections/... instead. (Btw: when I was rewriting collserial.c I saw that the old code made the assumption that different names in the hashtable could point to the same collection. I couldn't see a way that would happen so I kinda skipped it and just handled _active differently. If anyone could enlighten me and tell me if I was right/wrong that would be great). Benchmarks: So.. was it all worth it? Well, you tell me: (Warning: highly unscientific benchmarks) +---------+------------+------------+-------------+ | Backend | Disk space | List time* | Query time**| +---------+------------+------------+-------------+ | SQlite | 36.85 MB | ~10.6 s | ~0.22 s | | S4 | 18.52 MB | ~ 2.0 s | ~0.14 s | +---------+------------+------------+-------------+ * xmms2 list > /dev/null ** xmms2 mlib search "~foo" AND "id<4000" > /dev/null The timings were done like this: time xmms2 {command} I then calculated server time as real - user, far from perfect I know, but it gives a general idea. As you can see just listing all entries in the playlist S4 is about 5 times as fast, or so it would seem, however running it in callgrind reveals that only about 15% of the time is spent in S4, the rest is spent packing the values into dicts and whatnot. For SQlite the time spent inside the backend is ~55%. The query timing doesn't really tell much, and if someone has some crazy queries that takes a long time you would probably be able to give some better benchmarks here. Drawbacks: You didn't think the performance improvements came for free did you? The biggest drawback is that S4 isn't ACID-compliant, meaning we don't guarantee anything. So if your little kid thinks your powerplug looks like a fun toy and unplugs it all bets are off and you may lose all data that has not been synced yet. However in most cases this will not be a big deal as the medialib are mostly just read. Do you have feedback, ideas, questions or anything else just reply or drop me a line on IRC. Cheers, -- Sivert Berg / cippo -- _______________________________________________ Xmms2-devel mailing list Xmms2-devel@lists.xmms.se http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel