Offloading the device detection to later would be possible, but it is not desired. Because there are no other such tasks already. It would take one script to update the log table (adding complexity). Then the scheduled task would have to run before the archiving, which is not implemented yet. In general, it would be awesome to make the devices detection as fast as we can, inlined in the tracking api piwik.php

Maybe we can add some clever if/else statements with some super regex, that would let us skip whole files of regex, if not matched? Or maybe there are other clever ways we can make detection faster... thoughts welcome!