This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12165 - Speed up genlang with a generated regex
Attached to Project:
Rockbox
Opened by Torne Wuff (torne) - Thursday, 23 June 2011, 00:06 GMT+2
Last edited by Thomas Martitz (kugel.) - Thursday, 08 September 2011, 16:44 GMT+2
Opened by Torne Wuff (torne) - Thursday, 23 June 2011, 00:06 GMT+2
Last edited by Thomas Martitz (kugel.) - Thursday, 08 September 2011, 16:44 GMT+2
|
DetailsWith this change generating all languages takes only two-thirds the
time. It changes the acceptable syntax for target wildcards in language files, however: instead of a comma-separated list of glob-style wildcards it requires that it be a comma-separated list of prefix matches, i.e. the * can only appear at the end of each wildcard, and ? cannot be used. This does not require any changes to existing language files as they are all already in this form. |
This task depends upon
Closed by Thomas Martitz (kugel.)
Thursday, 08 September 2011, 16:44 GMT+2
Reason for closing: Accepted
Additional comments about closing: r30481
Thursday, 08 September 2011, 16:44 GMT+2
Reason for closing: Accepted
Additional comments about closing: r30481
$BUILD/apps/lang/english.list is some cache file for the english strings. readenglish() is this cache file if it's newer than english.lang. The problem is the cache file is never updated after initial creation, so the fast path in readenglish() is only taken until english.lang is modified. I attach a patch to fix that, resulting in quite a speed up since the the fast path in readenglish() is taken.
Perhaps english.list should be generated via a make rule instead.
http://www.alice-dsl.net/simonemartitz/public/genlang-prof-chin/index.html (SVN)
http://www.alice-dsl.net/simonemartitz/public/genlang-prof-chin-torne/index.html (with the first patch)
http://www.alice-dsl.net/simonemartitz/public/genlang-prof-chin-torne-list/index.html (with both patches)