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
When reuse_uncertain mode is disabled, Serge::DB::Cached::find_best_translation() just detects that there are some translations for the string in the database and passes the call to Serge::DB::find_best_translation(). This method is slow, however, and it is run on each localization cycle for items that need to be translated but have multiple variants of translations in the database.
To optimize for this scenario, we can cache the number of translation variants for each source string in Serge::DB::Cached::preload_strings_for_lang() and then account for that number in Serge::DB::Cached::find_best_translation(), quitting early if reuse_uncertain is off, and there are multiple variants of the translation.
The text was updated successfully, but these errors were encountered:
When
reuse_uncertain
mode is disabled,Serge::DB::Cached::find_best_translation()
just detects that there are some translations for the string in the database and passes the call to Serge::DB::find_best_translation(). This method is slow, however, and it is run on each localization cycle for items that need to be translated but have multiple variants of translations in the database.To optimize for this scenario, we can cache the number of translation variants for each source string in
Serge::DB::Cached::preload_strings_for_lang()
and then account for that number inSerge::DB::Cached::find_best_translation()
, quitting early ifreuse_uncertain
is off, and there are multiple variants of the translation.The text was updated successfully, but these errors were encountered: