https://bugzilla.wikimedia.org/show_bug.cgi?id=63327
--- Comment #8 from Niklas Laxström niklas.laxstrom@gmail.com --- MediaWiki core has about 500000 strings (all languages together). Pywikibot has 11000 strings. Assuming parsing is linear on the number of strings, for Pywikibot your example would take 0.1 seconds. This leaves some room for growth, non-linear parsing time and slower machines.
I would also imagine that you could on startup just dump all the messages in an efficient serialized format provided by python, which is used on subsequent loads, if necessary. I might be able to help with that.