Yahoo reported on Tuesday an uncharacteristic rise in revenue for the second quarter, but it came with a hefty sum spent on boosting its search traffic.

Total sales for the period ending June 30 were $1.24 billion, up 15 percent from the previous year. In the company’s announcement, CEO Marissa Mayer called it the most substantial growth in revenue in nearly nine years.

Yahoo’s revenue from search ads and display ads both grew, at rates of 22 percent and 15 percent, respectively.

It would appear that Mayer’s efforts to turn around the struggling Internet portal have begun to pay off. Yahoo has struggled in recent years to grow its ad sales and attract users to its various online properties.

But Yahoo paid a lot for those gains. The company’s cost of revenue, or TAC, which is the amount Yahoo paid to search partners to acquire traffic, skyrocketed. It nearly quintupled, from $44 million in the second quarter of last year to $200 million.