Hoping it’s not already suggested, nor a T160565 duplicate.
The following may list a (too) large amount of messageGroups:
Special:PageTranslation, Special:AggregateGroups and group choosing tool in header of Special:Translate (following API query)
action=query format=json meta=messagegroups mgformat=tree mgiconsize=32 mgprop=id|label|icon|priority|prioritylangs|priorityforce
I suppose all these tools use the same internal API.
I hope pagination may improve both server-side and client-side performances (which are currently very poor).