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
The 'rake tolk:sync' command, which I do frequently, seems slow, even after loading Rails.
Could it be that tolk (so far) has used a quick-and-dirty algorithm for this syncing? Now that tolk is working well, could there be easy, low-hanging fruit to speed up the syncing?
For subtrees of YAML language keys, I guess it could:
Select bigger batches of rows (rowsets?) from the database;
Update rows in bigger batches, letting the database software return an error if someone else has changed a row, which usually wouldn't happen on development boxes.
Perhaps:
From the database, request (just) the ID's for all the main language-file YAML keys, in one big response, to find those (that are) gone from YAML;
Request from the database (just) the main language strings for all the ID's (that should still exist) in one big response, to see what's changed;
Then, for each language's database table:
a. Delete the unwanted rows in one big request;
b. For the main language keys whose strings have changed:
Update those rows of the main language's database in one big request;
Then, for each other language:
a. Blank (by updating) those rows in that language's database in one big request.
I'm using tolk 1.3.4 with Rails 3.2.9 on Ruby 1.9.3, and I have, in config/locales, two languages of YAML totaling 52,691 bytes.
The text was updated successfully, but these errors were encountered:
The 'rake tolk:sync' command, which I do frequently, seems slow, even after loading Rails.
Could it be that tolk (so far) has used a quick-and-dirty algorithm for this syncing? Now that tolk is working well, could there be easy, low-hanging fruit to speed up the syncing?
For subtrees of YAML language keys, I guess it could:
Perhaps:
From the database, request (just) the ID's for all the main language-file YAML keys, in one big response, to find those (that are) gone from YAML;
Request from the database (just) the main language strings for all the ID's (that should still exist) in one big response, to see what's changed;
Then, for each language's database table:
a. Delete the unwanted rows in one big request;
b. For the main language keys whose strings have changed:
Update those rows of the main language's database in one big request;
Then, for each other language:
a. Blank (by updating) those rows in that language's database in one big request.
I'm using tolk 1.3.4 with Rails 3.2.9 on Ruby 1.9.3, and I have, in config/locales, two languages of YAML totaling 52,691 bytes.
The text was updated successfully, but these errors were encountered: