# 7. Profiling Pitfalls
Part of [[Profiling and Optimization]]. Previous: [[6. Quest Performance Budgets]].
> [!note] Verification status
> Practical pitfalls collected from the 6000.5 profiling-tools docs, Meta's performance page, and standard Unity profiling practice. **Not a live post-mortem of a project.**
## 7.1 Pitfalls
1. **Signing off in the Editor.** The Editor is not the Player, and it is not a Quest 2. Play Mode is a hypothesis generator.
2. **Profiling a Development Build and expecting Release timings to match.** Development builds (and the Profiler itself) add overhead. Use them to find *what* is expensive, then spot-check a non-development build with OVR Metrics or a platform HUD for the headline FPS.
3. **Leaving Deep Profile on** while recording "final" numbers. Deep Profile changes the thing you are measuring. Same for allocation call stacks.
4. **Comparing unlike captures.** Different scenes, different quality levels, unlocked Quest clocks, a cold shader warmup, or Editor vs Player.
5. **One frame of evidence.** Use Profile Analyzer medians over the verb, not the nicest frame in the graph.
6. **Chasing GPU when you are CPU-bound** (or the reverse). Read `Gfx.WaitForPresent`, the GPU module, and OVR Metrics stale frames before you start deleting trees.
7. **Ignoring the render thread.** A light GPU and a busy animation / skinning / UI layout on the main thread still misses 13.9 ms because the render thread starts late. Meta calls this out in the draw-call section.
8. **Optimizing art you have not seen in the Frame Debugger.** A "hidden" shadow pass or a leftover screen-space effect can be the whole budget.
9. **Memory snapshots in the Editor** used as a Quest RAM budget. Capture on device.
10. **A static cache that is really a leak.** The Memory Profiler's path-to-root is the argument-ender.
11. **String-building overlays in `Update` in a shipping build.** Keep `ProfilerRecorder` HUDs inside `DEVELOPMENT_BUILD`.
12. **Turning off Incremental GC** "to make the graph tidier" and shipping the hitch.
13. **"We will pool later."** Later is the hitch in the first class playtest. Pool the projectiles and the audio the week you add them ([[Interactable Audio]]).
14. **Quest post-processing left at desktop defaults.** Bloom plus DoF plus motion blur plus MSAA is a fill-rate suicide note. See the Post-Processing tutorial and [[5.Quest 2 Performance and Rendering]].
15. **Forgetting that UI Toolkit / uGUI rebuilds are CPU.** [[7.UI Toolkit Pitfalls and Performance]] is part of this conversation.
## 7.2 A sentence for students
Measure the verb on the device, change one thing, measure the same verb again. Everything else is a story you are telling yourself.
## Official docs
- Profiling tools reference: https://docs.unity.com/en-us/engine/6000.5/manual/analysis/performance-profiling-tools
- Meta testing and performance analysis: https://developers.meta.com/horizon/documentation/unity/unity-perf/