In this 2014 photo, Sri Lankan President Mahinda Rajapaksa, right, offers prayers at the Tirumala Venkateswara Hindu Temple in Tirupati, Andhra Pradesh state, India. (AP)

The big idea: Few of us enjoy waiting in line, some to such an extent that they might even hire someone to hold their spot. Not all lines are the same: The one for a blockbuster movie might seem more worth it than one to collect dry cleaning.

On the other side of the line is the business or organization trying to keep customers happy. Queueing, as the operations folks (and the Brits) call it, is a tricky business problem. Instituting a solution that fits the organization and its customers is key.

The scenario: Just outside the city of Tirupati and about 90 miles northwest of Chennai, India, is the Sri Venkateswara Swamy Temple in the hill town of Tirumala, believed to be about 2,000 years old. With more than 40 million visitors a year, it’s the most visited Hindu temple in the world. Pilgrims pass the shrine of the Hindu god Lord Venkateswara — a view they have for only a few seconds.

The temple is renowned for its spiritual attraction and its long lines. Two queue complexes were built to handle thousands of devotees waiting an average of 10 hours for a free visit. The entrance to the complex was staffed by police, security and temple officials who checked tickets. Signs indicated the location of the compartments to which devotees should report for their turn. When devotees reached their compartment, their ticket was checked again, along with their fingerprints, which had to match the biometric data provided at the time of purchase.

Many pilgrims found the long wait complex, tiring and restrictive. There was uncertainty about when their visit would take place. Some were calling for changes to the temple structure to allow for a faster flow, or the restriction of the number of visitors, but opposition was fierce toward any change that would threaten tradition.

The resolution: Over the years, efforts were made to change waiting times. An announcement system providing the expected wait time was added in the waiting rooms. Free refreshments and TVs showing religious programs were included. And a token system was instituted that allowed pilgrims to avoid hours of pre-process waiting in a virtual queue, freeing them up to do other things. Fewer VIP visits that limited viewing times were permitted.

The lesson: The temple’s “customers” are passionate about visiting Tirumala. They travel long distances and are willing to endure long lines and difficult conditions for the opportunity. Nothing is more valuable to them than time with their deity.

The temple management made changes while honoring the sacred nature of Tirumala. Changes to the pre-process portion managed customers’ perception of wait time — group waiting is known to feel shorter than solo waiting. Likewise, knowing wait times might decrease anxiety. Known waits are perceived to be less than uncertain ones.

— Gerry Yemen, Elliott Weiss and Steve Maiden

Yemen is a senior researcher, Elliott Weiss is a business professor and Steve Maiden is a case writer at the University of Virginia Darden School of Business.