« Whadda You Mean, No Downgrade? | Main | No LASIK »
June 5, 2006
Observations on MTP
I decided to take the plunge and load the MTP-based 2.x firmware on my new Creative Zen Touch. The libmtp project seems to be doing a respectable job of implementing the protocol feature-set, and gnomad2 is a usable transfer tool.
Since gnomad2 doesn't support the sort of inclusion/exclusion patterns I had been using with rsync, I ended up using lndir (1) to create a mirror directory structure with symlinks to the actual mp3 files, and a simple shell loop to remove files from the exclude list (still in rsync format). I selected the toplevel, pressed transfer, and ignored the machine for most of the day. By late afternoon it had (finally) transferred all 6000-odd tracks to the device.
As an experiment, I closed gnomad2, reset the Zen, and started gnomad2 up again. About 7 minutes (!) later it had finally finished scanning the metadata from the jukebox and presented a list of tracks.
I figured that must have been a fluke, so I used the libmtp command-line tool (tracks) to read back the track meta-data. Sure enough, about 6:30 seconds later it had retrieved about 1.5 MB of meta-data. Three-hundred-ninety seconds (6*30+30) to read 12,300 bits (1.5*1024*8) of data is a transfer rate of 31 bits per second (and I'm being generous - the resulting output had a lot of static text, the actual meta-data was probably only 3/4 of that).
Contrast that with the neuros, which just uses a (set of) plain file(s) which can be read using standard file-system operations (and since they're accessed on a standard vfat file system via USB mass storage, cached aggressively and intelligently read-ahead by the OS). A java-based sync tool read the entire meta-data database for over 7000 tracks in about 35 seconds.
One could argue that at least part of the poor performance of MTP is due to the implementation in libmtp - which is probably true, and in support of my point. Which is why, oh why, was a special-purpose protocol required?
Now, I don't know anything about MTP, and I'm sure there are some good reasons for the protocols existence (well, I'm sure there are some DRM-related reasons, which are something like good reasons, only without the "good" part) but come on...
Posted by dberger at June 5, 2006 10:07 PM