You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GoCollector which is registered by default in the default registry calls[1] runtime.ReadMemStats which has the side effect of stopping the world[2] (releasing all the running threads to the OS...).
Obviously this can have a negative impact on performance.
The main problem is you can't opt out from this if you use the default registry, since the collector is registered in the default registry on package init.
A workaround is to have a package that registers a new default registry in init and import it before everything else in your main binary, but it doesn't feel sane and you have to get the other stats from a different collector that doesn't call runtime.ReadMemStats.