Posted by damienmckenna on July 5, 2016 at 6:01pm
On a site I'm helping with we have a problem that the {locales_source} table growing in size and affecting the site's performance. We're using the locale module for front-end translations, but all of our staff are using English so we don't need translations on admin pages. Some recent analysis of the table shows a large portion is for admin pages.

Comments
Moving common strings to settings.php?
It seems one option might be to move common strings to settings.php. I used the following query to get a list of which strings were most common:
There are quite a number of strings listed which are from admin pages, so we're going to try the settings.php approach a bit and see how much query activity we can reduce.
If the settings.php solution is not manageable
If the settings.php solution is not manageable, these translations are cached so one option would be to utilize an alternative cache backend (memcache, Redis). Not the ideal solution you're looking for, but less expensive than the MySQL lookup and unserialization from the default cache handling.
I generally recommend using an alternate cache backend for most sites anyways.
Also worth noting, the query you utilized shows number of times in the UI where the string is appearing but is not necessarily indicative of the frequency that the strings are used/looked-up.
Already using memcache
Thanks for the suggestion. We're already using memcache, so that's already taken care of.
And yes, the number of duplicates in {locales_source} is not connected to the number of times the strings are looked up, we're also looking to find a way of logging those numbers.
I'm curious of this as well.
I'm curious of this as well. Got an English to English site where the translation is minimal between locales and admin ui is not needed at all.
Also would be nice to optimize for when they are needed as well though to get a better system for all.