GResource and colord startup

A couple of days ago I released colord 0.1.30. This was an otherwise unremarkable release with the normal splattering of a few bugfixes and the occasional small new features.

One such feature is the use of GResource. The new GResource stuff that landed in Glib 2.32 allows you to embed abritary binary data into the actual executable file. This is typically used for embedding small files that are normally loaded at runtime, for instance D-Bus introspection files or small application icons. Embedding that data also lets us strip the blanks from any XML file, and optionally compress the data too. It means we’re not seeking and loading many small files when the binary is run, which reduces by a small amount the amount of I/O that is done, and hence speeds up startup.

So I got thinking. Looking at the cold startup[1] I/O profile of colord, the first thing it does is scan for any files in /usr/share/color/icc for *.icc files. On the default system in Fedora, we only have a few files installed in that directory, and all of them are generated by colord at package build time and shipped in the colord package. We know where they are going to be, and what the contents are. Typically there are ~10 profiles installed, and they are all less than 1kb in size.

Since 0.1.30, at build time the profiles generated by colord (and only those) get included into the binary as resources. This means the colord binary size grows by slightly less than 10k, but means we don’t load 10 small files from the disk at startup. The files are still installed like normal so that applications can reference them as files like before, but if there is an internal mmap’ed copy of the same profile we use that instead. This reduces the amount of I/O that colord does at startup by about half. It speeds the daemon startup by about 35ms on SSD hardware (as seeks are cheap) but on spinning rust drives or LiveCD media it makes an order of magnitude more difference.

[1] cold, as in not in hot-cache. Do ‘echo 3 > /proc/sys/vm/drop_caches’ if you want to see the difference.


Color Calibration Survey Results

A couple of weeks ago I asked people on my blog and a few chosen mailing lists to answer three simple questions:

  1. What monitor calibration devices do you own?
  2. Which of these devices have you used in the last 6 months?
  3. If you were to buy a new calibration device, which would you buy?

I wanted to work out what hardware I should buy for testing with gnome-color-manager and colord for each release. The results are very skewed toward Linux users, but that was kind of the point of the survey.

So, the first set of data, which 203 people answered:

Notable points:

  • Nobody owns a Colorimetre HCFR. Not much of a suprise really.
  • Spyder4 is new hardware which performs well, but hardly anyone owns one yet.
  • 43% of people answering the survey own a ColorHug, which isn’t too much of a suprise since it was posted on the ColorHug Google+ page. Still, pretty awesome for such a new project.

The next graph is very similar to the first, with 191 people responding:

Notable points:

  • There are a lot of Spyder2’s sitting in drawers unused.
  • Lots of people bought a ColorHug, and don’t use it very often. This isn’t suprising as it’s the least expensive device by a long way.
  • i1Pro owners use the device a lot more than people that own other devices. This is also a very expensive device, so again, kinda makes sense.

The last graph is interesting in a number of ways, from 173 users:

  • 52% of Linux users would buy a ColorHug. This is the most popular cheap colorimeter option.
  • 31% of people would buy a much more expensive photospectrometer rather than a colorimeter.
  • 11% of people want to buy hardware considered obsolete by the manufacturer.
  • 2 people want to buy a Colorimetre HCFR. Good luck there :)
  • 6 people wanted to buy a ColorHug Spectro, even though it wasn’t an option on the survey and doesn’t even exist yet.

Based on the results of this data, I think it’s important for me to buy some Spyder hardware and concentrate on the photospectrometer-type hardware. Thanks to all respondents, your help has been really valuable.