> The profile seems to confirm that this is largely due to cache misses.
Can you elaborate? Cache misses of what? Why is the planning time so variable?