Leave out magic perf code unless requested

Change-Id: I154e288e440abd70dd4eec590150be1e800efac9