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?
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.
Just because other countries have had more violence doesn't make the incident any less shocking or less applicable to the argument.