Like retailers across the world, UK grocers including market leader Tesco (TSCO.L) and No. 2 Sainsbury's (SBRY.L) are struggling with the soaring cost of supplies, a shortage of key products and workers, and cash-strapped consumers.
But they enter the downturn on the back of an already lengthy period of cost cutting due to fierce competition, forcing them to look for new ways to make savings while increasingly using data to predict customer reactions to change.
"I spend a lot of time in our competitors' (stores), all of the team do too, we're constantly looking at what they're doing," Sainsbury's CEO Simon Roberts told Reuters.
While passing on some price rises to customers and taking a hit to profit margins themselves, supermarkets are fighting to limit the pain for consumers on their most important lines, like fresh fruit and vegetables, meat, fish and poultry.
"They'll all be looking at their relative performance and their relative price position like never before, because that's in the end what counts, their relative position to everybody else on price," said one grocery industry veteran, speaking on condition of anonymity.
Tesco and Sainsbury's are both matching prices on key items with German-owned discounter Aldi, seen as the low-price benchmark.
Prices are rising after the war in Ukraine restricted supplies of sunflower oil and boosted wheat and animal feed prices - pushing up the cost of meat, dairy and bakery products. Soaring energy and fuel prices, as well as increased labour and transport costs, have added to the mix.
UK grocery inflation hit 8.3% in June, a 13-year high, according to market researcher Kantar, forcing shoppers to cut back and buy cheaper ranges. U.S. bank Citi said UK food price inflation could hit 20% early next year.
One focus for supermarkets is reducing the range of products they offer, with their ability to sell multiple types of, for example, olive oil, beans or toilet roll no longer seen as a priority for customers.
While supermarkets sought simplification before, the quest for new savings means they are attacking it with renewed vigour, as focusing their buying power allows them to get better terms.
In the last year, Tesco reduced the number of lines it sold of dairy alternatives, such as oat and almond milk, by 47%, leading to a 4% improvement in availability in retained lines.
Similarly, a 19% reduction in the amount of yoghurt lines led to an 11% improvement in availability.
Privately-owned Asda said it reduced its food range by 12.5% last year, primarily by removing duplicate products. However, the introduction of more budget products meant its range has increased by 2.5% this year.
The approach fits with steps taken by French food giant Danone (DANO.PA), the world's biggest yoghurt maker, which is cutting the variety of products it sells, including the number of flavours and packaging size options.
"If you halve your range in an area then the half that you've got left instantly becomes twice as fast selling on average, assuming you haven't lost a customer on what you've discontinued," said the grocery industry veteran.
"And if you're moving from two suppliers to one supplier then your terms with that supplier can improve dramatically."
Supermarkets can reduce ranges more effectively than in the past by using customer data and analytics to predict whether shoppers will accept an alternative brand or not.
"The role that algorithms play now in understanding the commercial model is super important," said Sainsbury's Roberts.
"We've got some more innovation but also we've trimmed certain categories as well," he said.
With Britain's supermarkets operating on margins of only around 3%, they also need to make savings across the business.
"If we're going to invest 500 million pounds on bringing prices down, or 100 million pounds this year, 200 million pounds over two years, investing in colleagues, then we have to find efficiencies," said Roberts.
Market-leader Tesco has leveraged highly publicised price matching offers and a popular "Clubcard Prices" loyalty scheme to agree good terms with suppliers, enabling it to ensure that where it has to raise prices it tries "to ensure it is a little bit less and a little bit later than the rest of the market," it says.
But tensions with some suppliers are rising. On Wednesday, U.S. food giant Kraft Heinz (KHC.O) stopped supplying some products to Tesco after the grocer resisted higher prices.
While, like Sainsbury's, Tesco has warned of a hit to profits this year, industry data shows it is consistently outperforming rivals on a sales value basis, along with discounters Aldi and Lidl.
"Our ambition is to outperform the market, we can't control the environment, which of course remains incredibly challenged and frankly looks like it's getting more challenging," CEO Ken Murphy said.