Quick answer: When a built game runs slower than it does in the editor, the cause is usually a difference in configuration: the build may use different (higher) quality settings, a different resolution or vsync, a debug rather than release configuration, or run on different conditions than the editor. Profile the actual build (not the editor), compare its settings to the editor's, and make sure you're testing an optimized release build, not a development one.
It's a confusing situation that trips up many developers: the game runs smoothly in the editor, but the exported build is slow. It seems backwards, shouldn't a standalone build be faster than running inside the editor? Usually the difference is configuration, the build and the editor are running under different settings or conditions, and the build's happen to be heavier.
Why a Build Can Run Slower Than the Editor
The editor and the build can differ in ways that affect performance, and not always in the editor's favor. Different quality/graphics settings: the build may default to higher quality settings (resolution, effects, shadows) than your editor was using, so it's doing more work. Different resolution or vsync: a fullscreen build at native resolution with vsync behaves differently than a small editor viewport. Build configuration: if you exported a debug/development build rather than an optimized release build, it can be slower (development builds include overhead). And different conditions: the build runs fullscreen, standalone, possibly with different settings than the editor session you were comparing.
So 'slow when built' is usually not that the build is inherently slow, but that it's running under heavier settings or a non-optimized configuration than your editor comparison. The editor's lighter viewport or settings flattered the performance.
How to Diagnose It
Profile the actual build, not the editor, performance must be measured on the thing players run. Compare the build's settings to the editor's: what quality level, resolution, and vsync is the build using versus what you had in the editor? Check whether you exported a development/debug build or an optimized release build (this is a common cause, a development build with profiling/debug overhead is slower). Identify what's different about the build's configuration that makes it heavier.
Most importantly, capture how the build performs on real hardware, the build is what players run, so its performance on their machines is what matters. Bugnet's performance monitoring captures real-world build performance across player hardware, so you see how the shipped build actually performs (which is the relevant number), not just how the editor felt on your dev machine.
How to Fix It
First, make sure you're testing and shipping an optimized release build, not a development/debug one, this alone resolves some cases. Then reconcile settings: if the build uses heavier quality settings than necessary, adjust the defaults to something appropriate (and add scalable settings so players can tune), so the build isn't doing more work than needed. Match or set the resolution and vsync sensibly. Essentially, ensure the build's configuration is the optimized, appropriately-tuned one, not an accidental heavy or debug configuration.
Then optimize for real: profile the release build on real (including lower-end) hardware and optimize the actual bottlenecks there, since the build on a player's machine is the real target, not the editor on your dev machine. The lesson is that editor performance is not a reliable indicator of shipped performance, always profile and test the actual optimized build on representative hardware, which is what players experience.
A build slower than the editor usually means heavier settings or a debug configuration, not an inherently slow build. Profile the optimized release build on real hardware, the editor lies.