locale, factor, shuf: Example of deferred locale loading for clap#10911
locale, factor, shuf: Example of deferred locale loading for clap#10911ChrisDryden wants to merge 3 commits intouutils:mainfrom
Conversation
|
Whoops didn't realize, uudoc calls uuapp directly, should be a simple fix to swap the names of the two uuapp functions and it should work backwards compatible. Just waiting to see the perf numbers and the gnu test results |
|
GNU testsuite comparison: |
Merging this PR will degrade performance by 4.94%
Performance Changes
Comparing Footnotes
|
|
This should also unblock us from doing translations in all of the shared libraries because there will no longer be the performance penalty hit from adding a bunch of translations into the shared locale file |
|
GNU testsuite comparison: |
A few month ago I attempted the same thing but now I've got a much better understanding of the project to attempt it again. The change here is that there is a parse_deferred handler now that attempts to parse the clap arguments and it it fails it will reattempt it with the locale files loaded. This combined with changes in the default locale initialization to take the util_name at the beginning from the arguments allows us to not have to load the locale file until the translation is actually required.
This requires migrating each utility to this new format, but I already started the process for factor and shuf to start.
This change is also required for the
ls/stat-free-symlinkgnu test and it should make the valgrind tests much more stable since it runs twice as fast in local testing and less likely to timeout.