When thinking about how a movie or TV show comes together to make what ends up onscreen, it’s hard not to default to the categories that awards shows have always held up as the most important: directing, acting, writing. These are the most visible, obvious components of any production, the ones that make their presence impossible to ignore in every frame.

But there’s one element that, if done right, you might hardly notice.

No matter what’s happening on and offscreen, editing can make or break it. A great edit can sharpen the edges and direct the viewer’s attention exactly where it needs to be. On the flip side, a crappy edit can lead to dead air and thoughtless cuts that dull the impact of both the picture and the story.

And for as much as something like the Oscars tends to reward editing that can make sense of big, bombastic productions, editing really matters for comedies, where punchlines can snap with the right cut or thud like a wet spitball with a sloppy one. As my colleague Todd VanDerWerff once wrote for the A.V. Club on New Girl’s excellent editing team, “The unsung heroes of the single-camera comedy revolution are the editors. ... The secret to comedy, particularly when there’s no laugh track or live studio audience, is pacing, and even a not particularly funny show can gain some points so long as it’s paced really well.”

So yes, when I first watched Brooklyn Nine-Nine’s awesome episode “The Box,” I was struck by writer Luke Del Tredici’s quick banter, Claire Scanlon’s slick direction, and the fun, fizzy chemistry between Andy Samberg, Andre Braugher, and smooth-as-hell guest star Sterling K. Brown. But when I took a step back from it, the piece of this episode that makes me love it most is Jeremy Reuben’s editing, which takes “The Box” to a whole new level of sharpness.

“The Box” was always going to be good. But outstanding editing made it great.

Brooklyn Nine-Nine is usually a zany ensemble comedy that juggles two or three stories at once, with the detectives of Brooklyn’s 99th Precinct taking on everything from active hostage situations to low-key yogurt addictions. But “The Box” deviates from the show’s usual format to deliver a three-hander between Samberg, Braugher, and Brown that takes place almost entirely within the confines of a negotiation room (a.k.a. “the box”). Per co-creator Dan Goor, “The Box” was inspired by “Three Men and Adena,” a decidedly serious episode of NBC’s Homicide: Life on the Street — a ’90s police procedural that also starred Braugher.

“The Box” puts Brown’s seemingly unflappable dentist Philip under the harsh fluorescent lights as Jake (Samberg) throws himself headlong into the interrogation and Captain Holt (Braugher) tries to take his more innately deadpan approach. Del Tredici’s script serves up rapid-fire exchanges that keep the interrogation steamrolling ahead, and Scanlon’s subtle changes to Brooklyn Nine-Nine’s default direction make the scenes in which Jake and Holt stare down their suspect feel more ominous than the show’s usual vibe.

But Reuben had a deceptively hard job in piecing together this episode, which hinges entirely on the balance between the show’s typically irreverent jokes and the murder suspect’s sinister smile, slowly unfurling as Jake and Holt get more frustrated with their inability to crack him. Also, two of the three characters in question — Holt and Philip — favor a more deliberate line delivery that inevitably slows down the pace of any scene they’re in, even if just a little.

Reuben, drafting off Scanlon’s brisk direction, keeps the episode moving with cuts as quick as they are precise. As the night wears on and Holt and Jake get more desperate, the cuts switch between each character more and more rapidly until there are barely any spaces between their lines. Samberg’s goofy energy has always been a perfect foil for Braugher’s grounded gravitas, but they find themselves a worthy scene partner in Brown, who barely blinks when thrown into their chaotic midst.

Smash cuts — a sudden cut from one scene to another, one of the best tricks in the Brooklyn Nine-Nine editing arsenal — also get a sterling showcase in “The Box.” Every so often, scenes smash-cut to a title card revealing what time it is, and every time, the timing’s a punchline in and of itself.

At one point, Holt gets so wrapped up in passionately defending the merits of respecting proper terminology (bless Holt) that the scene smash-cuts to him panting in the hallway, admitting after a huge gulp of water that he lost control. At another, Jake says he’s got an idea, and the scene smash-cuts to him blankly strumming a guitar and screaming into Philip’s unwavering face, before smash-cutting right back to Jake and Holt behind the two-way mirror, stumped once again.

This sounds easy enough, but make no mistake: The timing of each of these moments is very carefully chosen, by Scanlon during shooting and by Reuben after. Every decision of exactly when to move from one scene or joke to the next is a crucial one, and with “The Box,” Reuben rose spectacularly to the occasion.