Adding some timing code to track where things are slow.

Playing around with this, it seems to eventually get fast, implying
that after a point enough memory has been allocated, but it takes a
while…