You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
Share the hash evaluation when looking for a string in multiple files of one domain (typically the default domain). This could be done by storing an array of already evaluated hash values in a static properties ( so shared across all instances of Hash_Search ).
I am trying to understand the difference compared to the actual implementation in WordPress but the readme and from the code I don't find anything useful.
Taking as example also this that has object cache and use the php gettext module.
Used by WordPress. Load all the strings from the file and process them to be able to make the translation easily. The first step (load the file and process all strings) is slow. The translation is fast.
Used by the original GNU Gettext. Load only the file headers and tables to find strings. Search for a string in the file only when you actually need to translate it. The first step is very fast compared to first method. The translation is slower compared to the first method.
If you need to translate all the strings included in the file, then the first method is the best. If you need to translate only a few strings avalaible in the file, then the second method is best.
DynaMo currently implements only the second method. #1 explains some of the choices that I have made.
Taking as example also this that has object cache and use the php gettext module.
I am not sure to understand what you mean. However, since you mention object cache, I have plans to try to take profit of it. Although I am still experimenting with it, this will probably be a completely different implementation compared to the uncached version. As for PHP Gettext module, I have no experience with it and currently have no plans with it.
Thanks for the explanation, really worth it (as I am one of the contributor to https://core.trac.wordpress.org/ticket/17268).
There is the gettext module natively by PHP since years so you don't need anymore to parse the binary file in PHP and this should improve the performances a lot.
It is used by https://github.com/aucor/dynamic-mo-loader, the author of this library suggested to check this library so this is the reason why I am here.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This issue is a summary of ideas that could be implemented in the future if they are worth it.
Hash_Search
).$this->originals
and thus avoid testing the existence of plural forms to use onlystrcmp()
inBinary_Search
. See Don't store plural forms in search handlers cache #8Is it useful to store original strings inThis seems to be useful for about 10% of the strings of the default domain.$this->originals
inHash_Search
?The text was updated successfully, but these errors were encountered: