It varies per time of year but Indo always looks to have the longest swell season coinciding with good winds.
The entire South coast of the archipelago facing the Indian Ocean has spots a plenty and a long swell producing fetch.
South America has a fetch from the entire southern Pacific Ocean , just the angle of the coast line is determining what's best.
I think Indo wins as the storms of the southern hemisphere winter are well below effecting local conditions and have cleaned up into meaningful wave trains. Maldives and Sri Lanka get these too , but are subject to swell decay being further from the storm source and slightly different weather patterns.
The storms track east often beginning near the southern east coast of South America going below South Africa and then below Australia across southern New Zealand and right across the Pacific truly big ones can cross the bottom of South America and regenerate into a new system.
Africa forms a sort of shadow barrier that cuts the angle of swell to the Maldives and Sri Lanka slightly.
Radiate out to more obscure parts of Indo and you get away from a large portion of the fly in fly out quick trip surfers, you just need a clear travel brain and plan.
A good speaking capability of Bahasa Indonesian helps greatly.

I've taken up troll hunting just for fun, instead of a rifle I'll just use a pun! 冲浪爷爷