Added some profiling to find out what is slowing stuff down…