Related T243725
Babel currently fetches languages from metawiki via the api. Since $wgBabelUseDatabase is true, this directly comes from the babel db table. It should be possibly to directly query the db instead of going through the overhead of an api hit.