A little planning can reduce your wait time by a lot. (David Goldman/Associated Press)

You know that part of your vacation where you hold your breath and hope for the best? It used to happen just before the plane landed, in that precarious moment between heaven and earth. But lately, it’s been taking place on terra firma, when you arrive at the airport and you’re confronted by a Transportation Security Administration screening.

For good reason. A few months ago, the TSA announced that screening with a full-body scanner would no longer be optional for some passengers, meaning there’s a better chance than ever you’ll be forced through one of the machines. What the agency euphemistically calls a “random and unpredictable” security screening adds an aspect of fear and uncertainty to an already fear-inducing and uncertain process.

And then there are the long lines, which have been blamed on cutbacks related to the TSA’s PreCheck program. The agency assigned to protect America’s transportation systems incorrectly predicted that more passengers would sign up for its trusted traveler program, so it cut staffing by 10 percent. The result? Record lines. The TSA says it’s taking steps to reduce the wait times.

The coping mechanisms have evolved in the past few months, so if you’re a frequent air traveler, you probably already know a lot of the following strategies, at least subconsciously. But with the summer travel season about to get underway, you may find yourself face to face with a TSA agent, unsure what to do. Travelers can avoid that fate with a little planning and a few insider strategies.

First, give yourself time. Lots of time. Josh Nathan, a professor at the Art Institute of Colorado, allows himself three hours to get through the TSA screening in Denver. That’s no typographical error. It’s advice he would pass along to anyone who’s thinking of flying this summer. “Plan for three hours, and be delighted if you make it to your airplane,” he says, adding, “If that departs on time, you feel like you won an unpublicized lottery.”

Why so long? Nathan reports that the Denver TSA, once one of the most efficient of the agency’s operations, has randomly closed checkpoints. A few weeks ago, the airport made headlines when TSA wait times exceeded one hour. To calm angry passengers, airport staff reportedly handed out bottled water, parceled out candies and brought in therapy dogs to soothe frayed nerves.

There are shortcuts, but they’ll cost you. Sonita Lontoh, a San Francisco technology executive and frequent flier, recommends paying $100 for a five-year membership in the Global Entry program, which also gives you TSA PreCheck eligibility. And the PreCheck lines, which allow you to get screened without removing the computer from your bag, taking off your shoes or passing through a full-body scanner, are significantly shorter.

“It’s much faster,” she says. For example, on a recent flight from Orlando, the difference between using the TSA PreCheck lane and the regular lane was more than an hour. How does she know? A colleague without PreCheck went through the regular line, and she didn’t see her until shortly before their flight began boarding.

There are other ways to cut the line. In Orlando, for example, you can also use Clear, a private biometric screening system. It costs about $15 a month to belong to Clear, which can be used at a number of airports in cities including San Francisco, Dallas and Baltimore (but not Washington). Neither Clear nor Global Entry are practical solutions for infrequent travelers, though.

What you wear this summer matters, says Katelyn O’Shaughnessy, a travel agent from Venice, Calif., who has advised countless clients on how to handle the TSA. With the agency beefing up security in the wake of various terrorist threats, you don’t want to wear anything that could slow down the process.

“Don’t wear shirts or pants with extraneous pockets, buttons, zippers, or anything with sequined bling on it,” she says. “These items tend to appear suspicious on the scanner, which is programmed to flag anything out of the ordinary.”

Unfortunately, it’s possible to follow all of this advice and still fall afoul of the TSA’s random and unpredictable security. Kimberly Marcus, an educational consultant from Alfred, N.Y., thought she had done everything right when she showed up for her recent flight at the Tri-Cities Regional Airport in Blountville, Tenn.

But an alarm sounded when she stepped through the scanner, and an agent ordered her to submit to an “enhanced” pat-down.

“An agent felt up my leg until she met resistance,” she says. “Several times. The agent also felt across the front of me with her fingertips. This routine is not at all routine or acceptable to me, and I found what would be sexual assault in other contexts to be very disturbing and upsetting.”

And that’s the problem with the TSA this summer. The expert advice works, but not every time. Which is to say, you can show up three hours early and still miss your plane. Trusted traveler programs don’t always send you to the front of the line, and you could still get a once-over by an agent and a possible delay. You can wear all the right clothes and still set off alarms.

Of course, nothing can prepare you for a prison-style pat-down at the hands of a TSA agent. And nothing can guarantee you’ll avoid it, either. But if you take a few precautions, you can come close. Don’t forget to breathe.

Elliott is a consumer advocate, journalist and co-founder of the advocacy group Travelers United. Email him at chris@elliott.org.

More from Travel:

What the TSA’s new body-scanner rules mean for you

Don’t mind the wet nose: TSA enlists more dogs to screen passengers

Travelers are less certain about the airport screening experience than they’ve been in years

Read past Navigator columns here