Quick answer: Spikes and hitches are isolated frames that take dramatically longer than normal, producing a visible stall amid otherwise-smooth play. They come from work that occasionally lands all in one frame: garbage collection pauses, a sudden large allocation or asset load, or a burst of computation. Profile frame time to catch the spikes and see what's in them, then eliminate the cause or spread the work across multiple frames so no single frame is overloaded.

A hitch, one frame that takes far longer than it should, is jarring because it briefly stalls the game in the middle of smooth play. Unlike a steady low frame rate, a hitch is an occasional event, which means the cause is something that happens intermittently and dumps a big chunk of work into a single frame. Fixing hitches is about finding and defusing those occasional work bombs.

What Causes Spikes and Hitches

A spike is a single frame whose work vastly exceeds the budget, causing a visible stall. The causes are all things that occasionally inject a large chunk of work into one frame: garbage collection, a GC pass stalls a frame while it runs (common in managed engines, triggered by accumulated allocations). Sudden allocation or loading, allocating a big chunk of memory, or loading an asset/level chunk, during gameplay blocks the frame it happens on. And work bursts, doing a lot at once (spawning many objects, a heavy computation, building a large data structure) on a single frame.

The defining trait is that these are fine on average but catastrophic in the one frame they land on, so the game is smooth except for occasional stalls. That pattern, smooth with intermittent spikes, distinguishes hitches from a steady low frame rate (always slow) and points at occasional, frame-dumping events as the cause.

How to Diagnose It

Profile frame time and watch for spikes, occasional tall bars where one frame took far longer than its neighbors. The timing of the spikes and a profiler tell you what's in the spiky frames: a GC pause, an allocation, an asset load, or a work burst. Correlate spikes with events, do they happen on a regular interval (suggesting GC), when entering an area (loading), or when a particular thing occurs (a burst)? That correlation identifies the cause.

Bugnet's performance monitoring captures the bad-case frame experience (spikes and hitches), not just average frame rate, so the occasional stalls that an average FPS hides surface in the data, including where and on what hardware they occur. A hitch that correlates with a specific moment (entering a level, first spawning an effect) points at on-demand work at that moment.

How to Fix It

Eliminate or spread the spiky work, no single frame should get a big unbudgeted chunk. For GC, reduce per-frame allocations (pool and reuse objects) so the GC runs less often and stalls less, the main fix for GC hitches. For sudden allocation/loading, do it ahead of time or in the background rather than during gameplay (preload, stream, allocate up front) so it's not dumped on a gameplay frame. For work bursts, amortize, spread the work across multiple frames (spawn over several frames, do computation incrementally) instead of all in one.

The unifying technique is to anticipate large costs and pay them ahead of time or spread them out, so no single frame is overloaded. After fixing, verify with frame-time profiling that the spikes are gone (no isolated tall frames), the definitive check, since average FPS won't reflect a few removed spikes much but the felt smoothness improves greatly. Removing hitches is one of the highest-impact polish improvements because each stall is so noticeable to players.

A hitch is one frame getting a big work bomb, GC, a load, or a burst. Find what lands in the spiky frame, then pay that cost ahead of time or spread it across frames.