More profiler optimisations