Cached l10n

Caches the global variable $l10n, which stores all translations for considerable speed improvement.

Author:seb@wemakecustom.com (profile at wordpress.org)
WordPress version required:3.0.1
WordPress version tested:3.5.1
Plugin version:0.2.2
Added to WordPress repository:23-04-2013
Last updated:23-04-2013
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:
Total downloads:653
Active installs:10+
plugin download
Click to start download

Upon inspection using xhProf, I realized that the PHP implementation loading the MO files is really slow. From my tests, about 25% to 40% of the time WordPress spends rendering the page is actually spent locating, parsing and merging all the translation files.

This plugin works by caching the whole $l10n variable holding all the text domains and overridding the load_textdomain.

Caching is done using serialize and written to wp-content/uploads/l10n.pson. Be sure to regenerate the cache if a .mo changes.

TODO

  • Provide a better UI page


ChangeLog