Indexing making XCode unusable

As per the title, whether I'm using the actual version from the App Store or the beta, Xcode is practically unusable on my 2017 MBP. Indexing starts randomly at least once a week and none of the solutions posted online work for me. This is often accompanied by multiple swift-frontend processes showing in Activity Monitor at 90% CPU usage.

I always try all the standard solutions from SO and here (e.g. clearing out derived data, deleting the .xcodeproj file, etc. and various permutations of those) and have reinstalled XCode on multiple occasions. Still, there's no solution that works - I just tend to leave my laptop for a day, sometimes more to do its thing and then it magically resolves eventually.

That amount of wait time is beyond unreasonable and is sadly making me re-consider whether Mac and iOS dev is really worth investing my time into. Has anyone been in a similar position and managed to find a solution? I'm really at my wits' end so would appreciate any new insights.

Indexing making XCode unusable
 
 
Q