Download the PHP package aucor/dynamic-mo-loader without Composer

On this page you can find all versions of the php package aucor/dynamic-mo-loader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dynamic-mo-loader

Dynamic MO Loader

Changing the WordPress site language to any other than English slows down page generation times. A lot. This is caused by the slow and inefficient way of text domain loading. This plugin, based on the excellent work by Björn Ahrens, aims to fix that by loading only the text domains that are used in a page and even more, by caching them.

PO and MO files are designed to be used with PHP Gettext-extension. But since it's an extension, it's not installed by default on all hosting platforms. To overcome this barrier, WordPress has re-implemented the whole MO file parsing in PHP completely ignoring the possibility to use native gettext, if available. This WordPress' implementation is a bit slow.

This plugin has another implementation of MO parsing, which is faster than the default one. The plugin also loads only the text domains that are required to generate the current page instead the default behavior of loading every available text domain. As front end pages usually only use strings from few text domains, this leads to a great performance boost in front end.

To boost the performance even more, the plugin also caches the loaded text domains in to the object cache. For optimal performance you need a fast object cache backend like Redis, Memcached or APC(u).

Numbers

These following experiments are conducted in a decent LEMP-server, using Nginx, MariaDB, php-fpm and Redis. The server has an SSD. This is the actual page generation time, not the server response time.

Default WordPress install, php5: 0 active plugins, Twentysixteen with default widgets etc.

                 en         fi          fi, cached
front page       26ms       37ms        29ms
post-new.php     47ms       81ms        61ms

Real-life WordPress install, php5: 15 active plugins, Twentysixteen with default widgets etc.

                 en         fi          fi, cached
front page       95ms       165ms       101ms
post-new.php     208ms      330ms       295ms

Default WordPress install, php7: 0 active plugins, Twentysixteen with default widgets etc.

                 en         fi          fi, cached
front page       12ms       18ms        14ms
post-new.php     27ms       43ms        37ms

Real-life WordPress install, php7: 15 active plugins, Twentysixteen with default widgets etc.

                 en         fi          fi, cached
front page       54ms       62ms        55ms
post-new.php     113ms      127ms       116ms

Validation with Xdebug

The following screenshot visualizes how a the built-in WordPress translation functions are skipped and the optimized dynamic loader classes are used instead, resulting in almost a twice as fast load time.

Inclusion in WordPress core

There are plans to implement native gettext in WordPress core. If that happens, this plugin will become obsolete. The ticket #17268 has however been open already for 6 years to it might not happen any soon though.

License

GPLv2 or later


All versions of dynamic-mo-loader with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aucor/dynamic-mo-loader contains the following files

Loading the files please wait ....