– McDonald's recently reported its best U.S. sales performance in almost four years, and much of it was credited to menu changes.

Plan, test, feedback, tweak, repeat. For the world's largest burger chain in the midst of a comeback, every step is especially vital.

There was a time when McDonald's took years to introduce menu items. Now, under the leadership of CEO Steve Easterbrook, it's often just months. McDonald's launched all-day breakfast in October after only nine months of planning.

The average wait time for a customer at McDonald's is about 90 seconds, so there's not a lot of wiggle room when it comes to allowing food with long prep times on the menu.

"As a cook I'd really like to focus on 20 items and do them really well than have 50 that we can only do OK," said Dan Coudreaut, McDonald's executive chef. "It's all about balance."

It can take months. Even years. The burger chain looks not only at what part of the menu it wants to tweak but what customers it wants to attract. Millennials, for example, tend to prefer snack-type items over big burgers.

At McDonald's suburban Chicago headquarters, where some products are conceived, chefs, food scientists and nutritionists all weigh in before the food is tested with a focus group and tweaked, accounting for everyone's input. Then in a warehouse where McDonald's has its Innovation Center, workers spend four to five weeks learning how to prepare the new item quickly and accurately, in a simulated setting.

After being tweaked, tested and retested, the food is ready for the big time … kind of. McDonald's asks a group of franchisees to put the item on their menu for a short time. The company tests products in regions where that type of food is most popular. That means chicken items get tested in Atlanta, coffee in the Northeast, salads on the West Coast and burgers in Texas.

Some menu offerings that were thought to be just for one region go national.

Sweet tea was developed for restaurants in the South but is now sold nationwide. Ditto for mozzarella sticks, which were requested by New York franchisees and launched nationwide in January. McWraps, which began in Austria and Poland in 2004, were brought to the U.S. in 2013 after being "altered" to cater to American tastes. What do you add to a wrap to make it more palatable for Americans? "Ranch dressing," Coudreaut said. "And bacon."

While McDonald's is largely mum on what new foods are being considered, Coudreaut and Richards said the company is taking a closer look at the menu's components than perhaps ever before. In years past, Coudreaut said there were some core menu items that were considered off-limits for change. But now, everything is on the table. And food, not speed, is now the first priority. "We're having the tough conversations," Coudreaut said.

"Operational efficiency has actually moved down in the ranks of priority because we want to focus most of all on the food," Richards said. "There's an openness to really going after the consumer that's so refreshing. I think there's some bright days ahead."