What: Shares of Chinese search engine provider Baidu (NASDAQ:BIDU) fell by 13.3% during the month of July, according to S&P Capital IQ data. While the company reported solid second-quarter results, slowing mobile growth, disappointing guidance, and rising costs sent the shares tumbling.

So what: Baidu's core business, online marketing, grew by 37.1% year over year during the second quarter, and the company's total revenue was in line with analyst estimates. Mobile revenue represented 50% of the total, but this percentage was flat compared to the previous quarter, meaning that mobile revenue grew at the same rate as total revenue quarter over quarter. Baidu guided for year-over-year revenue growth between 34.4% and 37.4% for the third quarter, but the consensus analyst estimate was a bit higher than this range.

Baidu is investing aggressively in the online-to-offline services market, and these costs weighed on the company's profits during the second quarter. Operating profit declined by 2.5% year over year despite the increase in revenue, driven by big increases in operating expenses. While revenue rose by 37.1% year over year, SG&A expense increased by 81%, while research and development expense rose by 56%.

This heavy spending is part of the company's plan to expand beyond search. CEO Robin Li explained: "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."

Now what: Baidu's earnings growth is stalling as the company pours money into building its online-to-offline e-commerce business. While this initiative is growing quickly, with a gross merchandise value of $6.5 billion going through the platform during the second quarter, a 109% year-over-year increase, essentially all of the company's revenue still comes from advertising.

With the stock slumping in July, it's clear that investors are questioning the wisdom of spending so much on these growth initiatives. It will likely take years before the O2O platform has any meaningful positive effect on Baidu's results, and investors will need to be patient as Baidu goes after what it sees as an enormous opportunity. Only time will tell whether this heavy spending will eventually pay off, but at the moment, investors aren't betting on it.

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.