As powerful as the net-color spec for CompIcc and Oyranos are, they are currently slow. It takes Compiz around 11 seconds to show a usable desktop. For a colour geek like me no problem. Especially with a wide gamut display the startup delay is less of a pain then over saturated colours. The weak points I could figure out is that Compiz sends several _NET_DESKTOP_GEOMETRY events. I tried to blacklist some events and fiddle with _NET_DESKTOP_GEOMETRY, but that gave errors in other places. After using the nvidia-settings panel the new monitors where not initialised by the CompIcc plugin. So I decided to speed up the remainder. That is Oyranos and some stuff inside the plugin itself.
First with many profiles installed Oyranos spends more time on greping through them to find implicit matches. The search for implicit matches occurs after the explicit search. So assigning a ICC profile to a monitor device would already help.
One of my monitors uses a lcms generated on the fly profile. That is much slower than the implicit search. So I decided to cache the on the fly profile. Its now in ~/.local/share/color/icc/devices/Monitor. Thats especially nice as it has a beautiful name on disk. Manufacturer-Model-Serial_edid.icc . The _edid sequence says, it is automatic generated. To look up the newly created profile, it has the meta tag with the EDID infos embedded. For the next start its a implicit profile and thats faster.
The next bottleneck is colour conversion. CompIcc uses a texture lookup with 64 cubic grid points. These are 262144 pixel or 1.5MB in memory per monitor. Of course the 64 grid could be reduced, but at the expense of precision. Thats not so nice on the desktop. As the transformation happens at start time 3 times per monitor, it appears as a good idea to cache this expensive texture. Its written to a Oyranos pixel array and cached with a Oyranos in memory hash table. The lookup is several times faster than the computation in lcms.
Well these two changes made CompIcc start now in five seconds or maybe four. Without my many profiles, startup in git takes around three seconds.
Further a on disk cache could help eliminate the texture computation. That would be around one second for my two monitors. The implicit search could be reduced by caching a list on disk for previously parsed ICC profiles. But that is always fragile without a proper md5 hash. And I am not sure if reading and hashing is actual the most expensive part during the implicit search. But after all a abstracted on disk cache would be great in Oyranos. Lets see when I come around that.