WPIntell

Source evidence

Large MO/PHP file Splitting

Performant Translations · support · 2023-09-24T17:58:00+00:00

mixedsentiment
mediumseverity
0.84relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 35 rows with source links

17.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
chrismask resolved
The plugin is awesome and an excellent idea. I had written the blog post about the slow localized WordPress and i have thoroughly made my tests with your plugin too. GingerMO on php part is done and working well. But still the performance gain is not big enough, since there are some immensely large po files, like the woocommerce and wordpress ones. The next step is definitely the splitting, either frontend/admin or even with a better way you had analyzed. For example, on my site, really utilizes around 100-200 woocommerce translations for frontend, and i use wordpress admin on english as default so the translated admin strings are useless. So currently my site only needs 100-200 out of the 8000 strings outputed on each and every page load with definitely slows down the site. I also use Code Profiler Pro plugin which tests the php performance of each plugin/file/function, and the Performant Translations plugin with woocommerce and other large mo/php files accounts for 0.1-0.15s on every page (out of arround 0.7s), and with only woocommerce file removed, it gets down to 0.04s which is great! So on my benchmarks, with performant translations, I found around 15-20% performance gain, and with smaller mo/php files, its an extra 10-15%. And my almost 30+% slower greek version of site (without the plugin), gets to almost identical with the plugin and with small mo/php files. Thanks for your feedback and sharing those numbers! The biggest issue with splitting files (e.g. frontend and admin) is that it can’t be done automatically as it’s impossible to know from the outside where a string is going to be used. So plugins like WooCommerce would need to manually do this splitting, and then WordPress could load the several groups individually when needed. Since this would require multiple infrastructure changes, it’s quite a big project in itself. In our testing we’ve actually seen that using PHP files is extremely fast, to a degree that there is basically no need for this kind of splitting. Woocommerce indeed needs to take the admin/frontend approach to their po files, no other plugins are so large and widely used and from wordpress team, so if one has to do this, its woocommerce. Indeed automatically understanding whats to be used for each scenario is difficult enough.

Comments

2 shown
Pascal Birchler 2023-09-25T09:27:00+00:00

Thanks for your feedback and sharing those numbers! The biggest issue with splitting files (e.g. frontend and admin) is that it can’t be done automatically as it’s impossible to know from the outside where a string is going to be used. So plugins like WooCommerce would need to manually do this splitting, and then WordPress could load the several groups individually when needed. Since this would require multiple infrastructure changes, it’s quite a big project in itself. In our testing we’ve actually seen that using PHP files is extremely fast, to a degree that there is basically no need for this kind of splitting.

chrismask 2023-09-25T20:21:00+00:00

Woocommerce indeed needs to take the admin/frontend approach to their po files, no other plugins are so large and widely used and from wordpress team, so if one has to do this, its woocommerce. Indeed automatically understanding whats to be used for each scenario is difficult enough.