Git is the coolest content versioning system since the birth of bits, and I gave two talks/courses recently: the first at the BarCamp in Lausanne (edition 2), and the second for the local LUG, AKA the GULL.
I’ve uploaded the PDF of the slides in English and in French, and in case anyone is interested in reusing them, the sources are available (warning: evil Keynote format; I was in a rush, won’t happen again) under the Creative Commons Attribution-Share Alike 2.5 License: sources in English, and in French.
And to follow up to the topic of Git, go and read this interesting article about using the Index to do partial commits and this short note about using git-rebase –interactive to rewrite history (not History, yet).
PS: I’m quite sure I’m scaring the shit out of my non-tech geek readers, sorry. Stay around though, I will try to split this blog in two (life stuff, bytes stuff) in the future, and I have a few entries about Japan cooking up…
permalink |
no comments »
The screaming groupies disturb my concentration, so I will reluctantly take a few minutes to silence the general hysteria. The secret is no more: we have über-optimized queries in XMMS2!
All thanks go to nesciens, who dived in the optimization documentation of SQLite to fix some stupid bottlenecks of my query generator. The two most important elements are the use of
COLLATION NOCASE
for case-insensitive comparison (instead of using
LOWER(value)
, which disabled indexing), and the creation of better indices on the Media table (including collated indices).
Let’s get some numbers out!
Quick note: in addition to a pair of [key, value] indices (one with BINARY collation and one with NOCASE), he added a pair of [id, key, value] indices. I couldn’t highlight any effect on performance of the latter two, but I left them in for those tests. (Hint: more tests and insight are welcome!)
I ran a series of benchmarks with different search patterns. The execution time has been averaged over 100 executions ran with the command
time for i in $(seq 100); do $CMD > /dev/null; done
. I compared the performance of execution in two versions of XMMS2:
- default DrKosmos (git hash: f171d33ca13e1715d3b167e8fa958a724eb032ce)
- optimized DrKosmos (git hash: 94661d22a7437b48c9cb5d4b1cd6483350d0a9a4, nesciens-sqloptims in my tree)
The queries used were the following (all matched songs):
Q1) artist:Air album:”Moon Safari”
Q2) artist:AIR
Q3) artist:Air album:”Moon*”
Q4) artist~Air
read the rest of this entry »
permalink |
no comments »