https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-05-19T13:28:04ZRedmineRedmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918542019-05-19T13:28:04ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29946">Feature #29946</a>: Update i18n gem (~> 1.6.0)</i> added</li></ul> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918562019-05-19T13:28:15ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>4.1.0</i></li></ul> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918572019-05-19T13:28:54ZGo MAEDA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29946">Feature #29946</a>: Update i18n gem (~> 1.6.0)</i>)</li></ul> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918592019-05-19T13:29:07ZGo MAEDA
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29946">Feature #29946</a>: Update i18n gem (~> 1.6.0)</i> added</li></ul> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918622019-05-19T13:36:15ZGo MAEDA
<ul><li><strong>Target version</strong> deleted (<del><i>4.1.0</i></del>)</li></ul> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=918832019-05-20T07:13:45ZMarius BĂLTEANU
<ul><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Target version</strong> set to <i>4.1.0</i></li></ul><p>Jean-Philippe, please take a look at the patch proposed by Pavel as a fix to a problem that was introduced by me when we updated the i8n gem to 1.6.0 (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Update i18n gem (~> 1.6.0) (Closed)" href="https://www.redmine.org/issues/29946">#29946</a>).</p>
<p>For me, the change looks good, especially because we drop quite a lot of custom code.</p> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=924692019-06-20T08:40:14ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>For me, the change looks good, especially because we drop quite a lot of custom code.</p>
</blockquote>
<p>Sure but it also removes the feature that this custom code provides :-)</p> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=924702019-06-20T08:42:29ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>fix type-casted translation keys</i> to <i>Remove custom lazy loading of i18n files</i></li><li><strong>Category</strong> set to <i>Code cleanup/refactoring</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> deleted (<del><i>4.1.0</i></del>)</li></ul><p>Patch committed.</p> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=924872019-06-20T12:43:58ZPavel Rosický
<ul></ul><p>thanks for the feedback. You're right, i18n gem provides lazy loading for translations, but it loads all available translations at once.</p>
<p>the original redmine backend loaded only the current locale and this optimization was removed.</p>
<p>here's a benchmark on a clean redmine instance (without plugins)<br /><pre>
1.859000 1.515000 3.374000 ( 3.379579) - load all locales
0.079000 0.063000 0.142000 ( 0.141866) - load the current locale (english)
</pre></p>
<p>on production all translations should be eager loaded, but on development the first request time is now significantly worse. Do you think it's worth to restore the optimization or improve it in the i18n gem?</p> Redmine - Patch #31384: Remove custom lazy loading of i18n fileshttps://www.redmine.org/issues/31384?journal_id=1058422022-03-04T00:02:56ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/36728">Feature #36728</a>: Reintroduce lazy loading of i18n files</i> added</li></ul>