Nonviolent methods often require the possibility of violence as a backdrop to be effective. Otherwise, they might not yield the desired results.
While Gandhi's philosophy sounds nice in theory, it may not always be the most practical in real-world scenarios.
You do know his philosophy worked, right?
Mandela initially followed Gandhi's example of nonviolent resistance to end apartheid but later abandoned it when it became clear it was ineffective.
Just imagine getting independence 5 years earlier by nationwide violent uprisings and non-cooperation moment together. Britain was already fighting on multiple fronts during WW2, it was a plausible path to early independence.
Sure we saved some lives that would've been lost in violent uprisings, but we lost just as many if not more from inaction.
If a movement of violent uprising resulted in Indias independence, the British may have packed their bags but the armies and militias would stay and given the nature of militias, will probably not suddenly turn peaceful. The British was the enemy yesterday, the other <religion, language or another faction> would the enemy today. See any African country.
What the nonviolent movement achieved in India is not just independence. Like you said there were other ways for independence, arguably faster. What the nonviolent movement achieved was long term stability and lack of civil wars /internal conflicts(for the most part).
Violence should be a last resort.
By a cyclone, accidents, and japanese blockades, the independent states suffered more because of poor infrastructure, lastly it was only known to Britain come August '43 whereupon 150,000 tonnes of wheat were redirected from Iraq and Aus.
Just because other countries have had more violence doesn't make the incident any less shocking or less applicable to the argument.