How to debug compilation time and loading time of packages?

I had the same problem and solved it by using dev instead of add when adding PackageCompiler (proposed here). However, I’m now having the same problem as decribed in this thread.