When Marissa Mayer was offered the chief executive job at Yahoo in the summer of 2012, she had a script for returning the pioneering internet company to the tiny club of Silicon Valley powerhouses.

To many in the tech industry, the very thought of Yahoo regaining prominence was a reach. Its revenue had been flat or declining for the previous five years. Google and Facebook had long taken the lead, and a new generation of tech start-ups was starting to elbow its way into the spotlight.

Yahoo? It was an afterthought.

The turnaround plan created by Mayer, a celebrated, though recently sidelined, executive at Google, was simple: Stop the downward spiral and increase Yahoo’s revenue within two or three years. After that, Mayer said she believed she could achieve double-digit annual growth by five years.

If Mayer could pull it off, she would become a business legend. Or, as had happened to several excessively optimistic executives before her, Yahoo could become her Waterloo.

Mayer has been on the job for two-and-a-half years. It is way too soon to say if Yahoo is rebounding from irrelevance. But although she has made some mistakes, she has also made some sharp acquisitions and rebuilt crucial products that have helped increase the company’s audience in areas like mobile devices.

Yahoo’s growth has been flat during her tenure. But recently, almost unknown to investors mostly interested in Yahoo for its $40 billion (Dh146.8 billion) stake in the Chinese e-commerce company Alibaba, Yahoo is showing progress. Revenue from the businesses Mayer created or acquired are growing at an annual rate of 80 per cent. She also said she expected overall growth to begin this year, which is pretty much in line with her original, optimistic timeline.

Despite these modest gains, Mayer finds herself besieged. A new book by the journalist Nicholas Carlson, Marissa Mayer and the Fight to Save Yahoo has brought attention to her missteps. More seriously, a cadre of activist investors is gunning for her. They want Mayer to keep her hands off the Alibaba investment and return the bulk of the proceeds to shareholders.

Where the future lies

They’re also pressing her to alter her strategy. They want her to cut costs, to stop spending money on acquisitions and to consider merging with another tech giant of the 1990s, AOL. That situation would most likely mean the end of Mayer’s involvement with the company.

That could squelch a turnaround just as it’s getting underway. “What’s important in all turnarounds is for the CEO to identify where the future lies — to have a plan,” said Karen Brenner, a professor at New York University’s Stern School of Business. In her short time at Yahoo, Mayer has done just that.

Yahoo faced two business problems when she arrived. Revenue from ads on its search engine struggled to keep up with the rest of the industry. Yahoo made the rest of its money by running banner ads alongside its news and entertainment sites and its services like web email.

But its audience shifted to using the web on their phones, where Yahoo’s content and ads were basically nonexistent.

Underlying these business problems was a more urgent issue of culture. Yahoo had a reputation as a place where many employees took it easy, and whose managers and executives constantly failed to anticipate coming changes in the industry.

To bring top mobile engineering talent into the company, she paid princely sums for a string of small software companies, a strategy criticised by analysts and even some old-time employees. She met frequently with product teams, often quizzing them on their technical choices and demanding, with a Steve Jobs-ian capriciousness, arbitrary-seeming, last-minute changes that sent employees scrambling.

At a time when Yahoo’s rivals were beginning to make the bulk of their money from apps on phones, the company’s puny investment in mobile — just 100 engineers worked on mobile products — was a looming disaster. Carlson reports that Mayer took a personal interest in Yahoo’s apps. In one of her first meetings with the team working on a new version of the Yahoo Mail iPhone app, Mayer immediately spotted technical shortcomings.

“Why is it so jerky?” she asked the app’s general manager. It turned out that team had been building what’s known as a “hybrid” app, a technical method that had fallen out of favour with mobile developers for its poor performance. Mayer ordered the team to tear up its plans and build a richer “native” app.

You can criticise Mayer for what the book suggests is a callousness with which she sometimes treats employees. She has also made colossal mistakes in choosing underlings, including Henrique de Castro, a former Google executive whom she hired as chief operating officer. He was fired after 15 months, over which time he was paid at least $88 million.

Idiosyncrasies

But you can criticise pretty much every tech executive for similar issues. Google’s Larry Page is also shy and socially awkward; Steve Jobs was a micromanager who made some bad hires; Jeff Bezos has made huge gambles and lost; and Bill Gates would rip his engineers to shreds if he believed they weren’t up to par.

Admirers of these men often overlook their idiosyncrasies because they got results. And that is what Mayer is starting to do. Since her appointment, Yahoo has released a string of apps that have won accolades from critics. Yahoo’s properties now attract about 550 million mobile users a month, and its growth has outpaced the industry average.

The research firm eMarketer says that Yahoo is poised to surpass Twitter for third place in the US mobile ad market (it remains far behind Facebook and Google).

“There are pieces of the puzzle coming into place,” said Brian Wieser, an analyst at the Pivotal Research Group who follows Yahoo and has long been sceptical of Mayer. “It’s clear that lessons have been learnt.”

But fixing broken tech companies is notoriously difficult. It took Lou Gerstner, IBM’s legendary turnaround artist, nearly a decade to remake that giant.

Apple’s revenue was mostly flat for about six years after Jobs returned in the late 1990s. If Mayer is to follow in their footsteps, she ought to at least be given enough time to try on the sneakers.