I put this as a comment in the doc, but I've seen the idea of realms floated to solve the problem of slow target generation from some backends like Go infecting the entire repo.
I had this problem, but don't love the idea of realms since, I have python tests of docker containers that have other language services in them (not Go any more since we just tore that all out).
An alternative proposal to realms:
If target generation is directory scoped (e.g. things in go/ won't create targets in python/), then you only need to run target generation for the directories you depend on with unresolved targets rather than running it globally.
This allows having a dependency from python->go when you want it, but avoid it when you don't.
If target generation/dependencies are not so neatly scoped under the hood, maybe it is possible to make the scope of target generation clearer in some way.