Run CPU and memory profiling with pprof to identify performance hotspots. Use when investigating high resource usage.