Three weeks ago, doctors gave her a new left knee, made of titanium and plastic. As a result, she is limping around Yahoo’s headquarters here, occasionally standing to hold a chair and stretch her leg while a bottle of Percocet sits at the ready on her desk.

stevelyon

Yahoo Center

Yahoo also underwent invasive surgery recently, selling its search business to Microsoft for an initial 88 percent share of search revenue in a 10-year deal. Since that move last week, Yahoo too has limped along, with disappointed investors asking whether Ms. Bartz could have won more favorable terms and with Yahoo shares tumbling more than 15 percent.

In a lengthy interview on Friday before departing for a vacation, Ms. Bartz said she sold the search business because Yahoo could no longer continue to match the level of investment Google and Microsoft were making in searching, one of the Web’s most lucrative and technologically complex businesses.

While reducing the marketing and infrastructure costs associated with search, the deal will also provide money that Yahoo can use to bolster other businesses. Ms. Bartz plans to invest the money in Yahoo’s display ad, content and mobile services technology.

“My first reaction when I got here was that I wouldn’t even do a search deal,” she said, “until I looked at our expense structure and our actual options and looked at what our prime job was, which is to grow audience.”

Yahoo will lose some of its most talented engineers to Microsoft and as many as 400 employees through layoffs. The deal also undercuts years of investment around search technology. By selling the technological crown jewels, the company may lose some of its high-tech credibility among employees and others in Silicon Valley, as well as among customers.

But the core of Yahoo remains intact, according to Ms. Bartz. “We haven’t eviscerated the company,” she said.

Given Yahoo’s battering by investors, Ms. Bartz lamented that Yahoo and Microsoft failed to explain the relationship better to Wall Street. She blamed herself for a comment she made several weeks ago, at an industry conference, that Microsoft would have to pay Yahoo “boatloads of cash” to win its search business. That statement, she said, helped to solidify an expectation that Yahoo would receive $1 billion or more upfront as part of the deal.

“I made a mistake. I was never interested in doing it for upfront money. That doesn’t help me operate a business,” Ms. Bartz said. She noted that such a payment would have had significant tax consequences while contributing only $3 million in annual interest to Yahoo’s bottom line.

Wall Street had become enamored with the previous, more immediately lucrative proposals between Microsoft and Yahoo. Last year, trying to improve its search business and better compete with its archrival Google, Microsoft offered $46 billion to buy all of Yahoo. Analysts estimate that the new deal — involving what many people saw as Yahoo’s most important asset — is worth only around $4 billion to $5 billion.

“It’s rather like getting a Picasso and saying, ‘You know, the canvas costs $200, the paint cost $300, so we’ll sell it to you for $500,’ ” said Jeffrey Lindsay, an analyst at Sanford C. Bernstein. “I’ve never seen investors so angry.”

Microsoft’s chief, Steven A. Ballmer, has gone to unusual lengths to defend the deal on Yahoo’s behalf. Last week, he told a group of investors gathered at Microsoft’s headquarters that it was “sort of unbelievable” that Yahoo got to keep such a high percentage of the ad sales while spending nothing on the underlying infrastructure to run the search operation.

And Ms. Bartz argues that the more generous offers came during far different economic times. In addition, she said, analysts have underestimated the two and half years it will take to integrate the two companies’ search and advertising systems. The companies also face the daunting process of getting approval from regulatory agencies that are now closely scrutinizing deals on antitrust grounds.

Ms. Bartz said that she avoided Mr. Ballmer’s immediate advances after taking the helm of Yahoo. “He called my first day,” she said. “I told him: ‘Go away. I haven’t even found the bathroom.’ ”

When Ms. Bartz finally began negotiations, Mr. Ballmer presented two options: a large upfront payment or a higher percentage of revenue tied to ads sold on Yahoo Web sites. “He wasn’t going to pay twice,” Ms. Bartz said.

Ultimately, Mr. Ballmer, who was unavailable to comment, and Ms. Bartz ended up on the phone debating minute details, like how fast things like search results and ads would appear, at one point haggling over a margin of 100 milliseconds.

Ms. Bartz also fought to play down Microsoft’s Bing brand on the Yahoo search results page, with just a bit of text instead of a logo, and she pushed Mr. Ballmer hard to make sure that Yahoo retained the right to sell its own display ads to big advertisers like Procter & Gamble and Unilever .

“I had to get Steve through the, ‘we get to sell part,’ ” she said. Meanwhile, Ms. Bartz has plenty of other work to do at Yahoo. She has picked up on the dysfunction throughout the company during her eight months on the job.

For one, Yahoo has not poured enough money into creating a top-class technology infrastructure capable of delivering a variety of services to consumers. “We are actually behind in investing,” she said. “We should have invested more.”

Ms. Bartz also complained about a lack of balance among the different product groups. Motivated employees in the company’s sports section have turned it into a must-visit Web destination by breaking news stories and providing witty commentary. Other sections have languished.

This is often a result of what Ms. Bartz sees as insufficient communication and barriers among the company’s various American and international properties over sharing videos and other content. “We had a fight for 18 months here on what a video button should look like,” Ms. Bartz said.

Spending money to fix these problems made more sense to Ms. Bartz than hemorrhaging cash in a bid to keep pace with Google and Microsoft.

Microsoft has backed its new search engine, Bing, with billions of dollars in infrastructure and marketing investments. So far, the search engine has been well received. While encouraged by some of Bing’s innovations, Ms. Bartz figures that Google will most likely match them soon. “That is the arms race I don’t want to be in,” she said.

But some investors fear that Yahoo may be trading one of the most profitable businesses of the 21st century — search — for a deflating, hypercompetitive media business that appeared to peak in the 20th century.

“I don’t think the surviving pieces are very interesting,” said Michael Lippert, manager of the Baron iOpportunity fund, which acquired Yahoo shares earlier this year on the anticipation of a lucrative search partnership. Mr. Lippert was disappointed by the terms of the deal but did not make out too badly; his fund also owns Microsoft stock, which rose slightly last week.