Actually, all this d**k measurement between Indians and Chinese seems too fanboyish to me. Honestly, China started opening up their economy in 1978, India in 1992. 15 years of gap. China started moderninsing their industrial production system in mid 1980s, India in late 1990s - almost 15 years of difference. China took the "manufacturing" production part because of cheap labor, huge boom in foreign direct investment (FDI) in the 1980s when there were not other competitions for the FDI (read US, european and Japanese investments). By the time India came into the game (mid 1990s), Eastern Europe, Russia, South America, South-east Asia were all competing with India for FDI in the manufacturing sectors, and China was still the king! As such, China only increased their lead in both FDI (~66% of all manufacturing FDI goes to China) and in manufacturing production (~70% of all manufacturing) over everybody else. So, India took the software and services path, where there was still some "market". As a result, India has become the biggest destination for services investment and services outsourcing. You all know this history. You are all mature adults. Still, if you behave like fanboys, and try to demean the two great nations of China and India, it only demeans you.
China will have problems with a growing India because of energy, FDI and other competition. Same way India will have problems with China. There might (and very well will be sometime or other) border skirmishes to show who is top dog in the region. In all probabilities it will end in a stalemate since neither country will like to escalate it too much lest it becomes a "nuclear" conflict. On India's side, India will like not to lose ground to Chinese superior forces. On the Chinese side, they will try not to lose face if they open the conflict. Both the countries are matured politically, both have big economic stakes in each other. Both of them know that fighting each otehr for long/ too hard will cause a general weakness in their politico-mililtary system, which other enemies can exploit. So, covert wars and skirmishes is what will go on.
However, for India, Pakistan is a different issue. Primarily because of the failing political system in Pakistan and the rise of militant religious fundamentalism. Someday, that rabid dog might just go back and bite it's new friend, the Chinese. I think China should think about that too.