Between street sweeping crews, staffed portable toilets and sidewalk steamers, San Francisco spent $94 million — or about $257,534 a day this year — trying to keep the city clean. And while progress has been made, the effort remains a losing battle.

The years of trench warfare between cleanup crews and bad actors was laid out clearly in two images Monday.

The first image was of Mayor London Breed flanked by city, civic and tourist industry leaders standing together in front of the giant Christmas tree at Union Square. The intent was to reassure tourists that the city is taking seriously concerns about its squalid streets and people behaving badly.

While that was happening an image of a man with his pants around his knees defecating in a Marina Safeway aisle was rocketing around the internet and TV.

“Here’s a pic of a man on drugs taking a poo in aisle 10 of the (Marina) Safeway, Sunday morning in #SF. Why is this okay?” tweeted Deborah Kan.

He “had plenty of time to find the toilet paper aisle, but not the actual bathroom,” Matt Estrada added in a second tweet.

Safeway didn’t respond to request for comment.

And while the city and business leaders assembled in Union Square continued their public calls for compassion, privately the same leaders say behavior like that exhibited in the Safeway — while extreme — hurts both retail businesses and the city’s $9 billion-a-year tourist industry.

In fact, the mayor’s media event was intended as a high-visibility response to software giant Oracle’s decision to move its annual convention to Las Vegas after 20 years in the city. Part of the reason: the squalid conditions in downtown San Francisco.

“We don’t want Oracle to be the beginning of a trend,” said Joe D’Alessandro, CEO of SF Travel, the city’s convention and visitors bureau. “If that becomes the case, San Francisco will be in for some very tough times.”

D’Alessandro noted that 33% of the 1,282 tourists questioned in a survey this year commissioned by agency cited homelessness and dirty streets as the least attractive aspects of visiting the city. Other dings against San Francisco — traffic and parking came in second, at 29%, and the high cost of visiting the city was third, at 13%.

That said, the survey, which was done by market researchers Destination Analysts over a 10-month period, found that despite the homelessness, dirty streets and expense, 97% of the hotel visitors said that they are likely to return to San Francisco.

“Do people love or hate San Francisco? Well, it’s really both,” D’Alessandro said. “What concerns us is that convention planners are a much more selective breed. Our street conditions and costs could tip the destination selection to somewhere else that doesn’t have these same issues, and we could lose significantly.”

The loss of the Oracle convention, which drew 60,000 money-spending visitors, represents a loss of about $67 million a year to local hotels, restaurants, caterers and other services.

“The costs of doing business in San Francisco will be difficult to change,” D’Alessandro said. “However, improving the street conditions is possible. People would be willing to pay more for San Francisco, as long as the experience on the streets was a positive one. Right now it’s not.”

While Breed predicted that other conventions would fill the Oracle void, more needs to be done about street conditions.

“Wherever you walk in San Francisco, it should be a good experience, and I am committed to working with all of the folks here to make sure that we make those experiences a lot better,” Breed told the assembled media Monday.

A lack of revenue growth has led Breed to order all city departments to cut their budgets in the coming year. She has also ordered departments to make homelessness, cleanliness and mental health programs their top priorities.

Public Works spokeswoman Rachel Gordon said the department’s street cleaning budget for the upcoming fiscal year remains a work in progress.

And city money is only part of the cleanup effort.

San Francisco’s 18 business improvement districts — businesses and property owners that tax themselves to provide additional services — are spending millions in private money.

Privately, those at the forefront of the fight say that no matter how much is spent, it’s still just a putting a bandage on the bigger problem of bad street behavior.

As Breed told cleanup crews she met with Thursday, “We also know it’s not just about the work that you do, it’s about how we change the attitudes with the people that are creating some of the problem.”

.@LondonBreed This pic was taken by a mom taking a walk w her 2 yr old on Union St #SF. Parents shouldn’t have to worry kids are going to pick up used needles left on the street. I am all for helping people with addiction but what about the rights of people not doing drugs? pic.twitter.com/t1ZVo9XBJ1 — Deborah Kan (@debkhk) December 18, 2019

Three days after the mayor’s Monday announcement, Kan posted another tweet addressed to the mayor along with a photo of syringes and other trash along a city sidewalk.

“This pic was taken by a mom taking a walk w her 2 yr old on Union St #SF. Parents shouldn’t have to worry kids are going to pick up used needles left on the street. I am all for helping people with addiction but what about the rights of people not doing drugs?”

It’s a question that other residents and tourists are asking as well.

San Francisco Chronicle columnist Phil Matier appears Sundays and Wednesdays. Matier can be seen on the KGO-TV morning and evening news and can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call 415-777-8815, or email pmatier@sfchronicle.com. Twitter: @philmatier