For visitors to Florence, it is an unpleasant test of endurance – queuing for up to four hours, in baking heat or pouring rain, for the privilege of entering the famed Uffizi Galleries, the repository of the world’s finest collection of Italian Renaissance art.
But now the museum plans to roll out a new system which will cut waiting times down to just a few minutes.
The initiative comes as the galleries continue to attract ever larger crowds, with numbers rising from two million visitors in 2016 to 2.2 million last year.
The museum is testing out a sophisticated algorithm which takes into account the weather, the time of day, whether it is low season or high season and the number of tour groups in order to calculate the best time for individuals to visit.
Tourists who turn up at the Uffizi will take a ticket from one of seven machines, which will then assign them a visiting time during the day.
It could be an hour or two later, depending on the density of tourist traffic.
In the meantime, tourists can wander off and grab a cappuccino or visit some of Florence’s other attractions, rather than being stuck in an interminable queue.
The system was tested last Sunday and drastically reduced the time that visitors had to queue, in a scheme that could be used by Italy’s other over-subscribed attractions, from the Colosseum to the Vatican Museums.
It was a particularly challenging day to choose because it was the one Sunday in the month when entry to the Uffizi is free – the crowds were bigger than normal and they started lining up at 7am.
“It was a fabulous result,” Eike Schmidt, the director of the Uffizi, told The Telegraph.
“It means that tourists will no longer be tired and grumpy by the time they’ve entered the first gallery. In high season, people queue for up to four hours, and never less than two hours. To our knowledge, we’re the first museum in the world to use a system like this.”
The algorithm was developed by computer science experts at the University of L’Aquila in central Italy.
The software can take into account, for instance, the fact that tour groups of more than 15 people tend to slow down the visitors who come behind them, making the duration of visits longer.
The weather is also a key factor. “People stay up to 45 minutes longer if it is raining or if it’s very hot outside, in which case they take advantage of the air conditioning,” said Dr Schmidt.
It is hoped that the new system will be in full-time operation by next year, once any glitches are ironed out.
Designed and built by Giorgio Vasari in the 16th century, the Palazzo degli Uffizi was originally home to Florence’s guilds, officials and magistrates – “uffizi” in Italian means offices.
It was eventually used to house the growing art collection of the Medici family, which was bequeathed to the city in 1743.
Among its treasures are works by Michelangelo, Giotto, Leonardo da Vinci, Raphael and Titian.