What's happening: Shares of Chinese Internet search giant Baidu (NASDAQ:BIDU) tumbled on Tuesday after the company reported its second-quarter earnings. While non-GAAP earnings came in above analyst expectations and revenue was in line with estimates, disappointing guidance and rapidly rising costs outweighed those positives. At noon, the stock was down about 16%.

Why it's happening: Baidu reported quarterly revenue of RMB16.575 billion, or $2.67 billion, up 38.3% year over year. Online marketing revenues rose 37.1% year over year, representing nearly all of Baidu's revenue. The number of online marketing customers rose 20.9% year over year to 590,000, and revenue per online marketing customer jumped 13.2%.

Mobile revenue accounted for 50% of Baidu's total revenue, with that percentage flat compared to the first quarter. Mobile search monthly active users grew 24% year over year to 629 million, while monthly active users of mobile maps rose 48% year over year to 304 million.

Net income rose just 3.3% year over year, to $590.6 million, despite the rapid revenue growth. Excluding stock-based compensation, diluted earnings per ADS came in at RMB11.19, or $1.81, above the average analyst estimate of RMB10.58. Expenses increased dramatically, with SG&A expenses rising 81% year over year, largely due to increased promotional spending for O2O, or online-to-offline commerce. During the quarter, the gross merchandise value for Baidu's O2O services totaled $6.5 billion, more than doubling year over year.

Baidu expects third-quarter revenue between RMB18.17 billion and RMB 18.58 billion, or $2.931 billion and $2.997 billion, representing growth in the range of 34.4%-37.4% year over year. The consensus analyst estimate is for revenue of RMB18.79 billion.

Baidu's search business is still growing quickly, but heavy investments in new businesses are driving down the company's margins. CEO Robin Li had this to say: "With Baidu's cornerstone search business delivering solid growth and enjoying ample runway ahead, and with powerful mobile gateways to leverage, we are ideally positioned to capture the O2O e-commerce opportunity and build the "Next Baidu." As we continue to connect people with services and enable closed loop transactions, we are creating a transactional business model as Baidu grows and evolves in the age of mobile."

Only time will tell whether these big investments will pay off for Baidu, but at the moment, investors don't seem pleased with the progress so far.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.