If you are trying to be a realist then here is a reality for you. Like before this attack, we were not focussed on porkies and kept an eye on China, similarly China doesn't factor us in and cares more about USA.
They are looking to emerge as the global superpower and a fight will India, no matter how costly for us, will leave them with a broken bloody nose as well. And poof goes all dreams of replacing USA.
If people are worried about our economy tanking in the aftermath of this porki war, what do you think will happen to China's economy after a war with India?
Also, re-unification of Taiwan is more important to them than solving whatever border issues we have. That's small peanuts in their larger national scheme of things. They poke us occasionally to drain our resources, test us, or divert us from the west but I don't see any logical reason why they will fight us as of today.
China will stay mum, or help porkies behind the scenes. No way they are meddling directly any which way.