It's been a long two years for investors in Baidu (BIDU -0.09%), the company that runs China's largest search engine. Even though growth rates have been staggering, and the market opportunity is still enormous, before this week, shares of the company were down 25% since July of 2011.

But that changed with the company's announcement of second-quarter earnings -- with shares trading as much as 17% higher on Thursday. Buried within the company's earnings announcement are four important nuggets I think every Baidu investor should be aware of.

1. Finally, mobile is catching on
Baidu's worldwide counterpart, Google(GOOGL -0.30%), has already run into this problem. Ads displayed via mobile devices -- smartphones and tablets -- don't generate as much revenue per click as those displayed on desktop computers. While Google has satisfied Wall Street with its mobile strategy, many investors have wondered if Baidu had a coherent plan for remaining relevant in the mobile era.

During the second quarter, however, Baidu earned over 10% of its revenue from mobile for the first time in the company's history. Furthermore, Baidu's acquisition of 91 Wireless -- China's largest third-party app distribution platform -- promises that the company will likely see that percentage grow in coming years.

2. Continuing to add customers
Baidu has estimated that there are 40 million small and medium-sized businesses that are potential marketing customers in China. Currently, Baidu has just a fraction of that market, with 468,000 online marketing partners as of last quarter. Part of the reason this is such an immature market is that China has only come online en masse over the past few years.

But what's important is that the company continues to show that it is winning over customers with the value proposition its advertising business offers. And not only is the list of clients growing, but the growth rate is accelerating.

Pay close attention to how much higher the purple bars have climbed in 2013, as the company added 33% more customers during the second quarter.

Source: Baidu Investor Relations. All numbers in thousands; percentages represent annualized growth rates.

3. Investing in the future
The field of technology has been changing at an unparalleled pace when viewed historically. Because of this, companies that are willing to spend money today to be relevant tomorrow have been rewarded.

While it would be easy for Baidu to cut its spending and focus on accumulating as much profit as possible right now, a move like that would quickly backfire.  The competition would be the ones to capitalize on the technologies of tomorrow.

That's why it's encouraging to see Baidu so aggressively investing in its future. While revenue grew by about 39% during the past quarter, spending in selling, general, and administrative increased 84%, while research and development spending jumped 73%. 

Of course, if this trend were to continue forever, the company wouldn't be that great of an investment. But Wall Street clearly thinks that at some point in the future, Baidu will have enough leverage to cut back on spending and rake in more profits.

4. Qi-Who?
It's no big secret that one of the big reasons Baidu's stock has endured a difficult couple of years is because of the competition from scrappy up-start Qihoo 360 (QIHU.DL). This company, which used to focus primarily on Internet security products, has been stealing search market share in China.

But although Qihoo likely still has a bright future, Baidu has demonstrated its huge advantage when it comes to the ability to invest in the future. The purchase of 91 Wireless, and its current spending to promote and develop its products, highlights this.

But nowhere is this advantage more obvious than in the amount of cash Baidu has on hand. As of the end of the second quarter, Baidu has $5.55 billion in cash -- whereas Qihoo has just one-twentieth that amount, or $300 million.