https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292008-08-20T04:23:56ZRedmineRedmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44142008-08-20T04:23:56ZEric Davis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied patch in <a class="changeset" title="Javascripts are now cached into a single file for downloads in production mode. Thanks to Philip..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1748">r1748</a>. Javascript files will now be cached as a single file.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44242008-08-20T19:24:19ZPhilippe Lafoucrière
<ul></ul><p>Be careful if later you want to use other javascript lib than the ones packaged with rails. I had surprises where some libs are requesting prototype, and they were not able to detect it any more with the cache mode.<br />To explain the cache mode in one line, all js files are concatened in one single file, easily compressable and cacheable.</p>
<p>Thanks</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44442008-08-21T19:40:56ZJan Losinski
<ul></ul><p>For me this Patch wont work.<br />If I've applied it there are no actions on the comment buttons of the issues, also the context menu at the issue list will not be available.<br />If I've removed it all the things works fine.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44462008-08-22T05:00:48ZEric Davis
<ul></ul><p>Philippe Lafoucrière wrote:</p>
<blockquote>
<p>Be careful if later you want to use other javascript lib than the ones packaged with rails. I had surprises where some libs are requesting prototype, and they were not able to detect it any more with the cache mode.</p>
</blockquote>
<p>Can you provide an example? I still see the Prototype object:</p>
<pre>
>>> Prototype.Version
"1.6.0.1"
</pre>
<p>Jan Losinski wrote:</p>
<blockquote>
<p>For me this Patch wont work.<br />If I've applied it there are no actions on the comment buttons of the issues, also the context menu at the issue list will not be available.<br />If I've removed it all the things works fine.</p>
</blockquote>
<p>Can you provide me your browser version and Operating system version? The context menu and issue links are working fine for me in Firefox. Also make sure you've cleared the browser cache.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44512008-08-22T06:48:31ZPhilippe Lafoucrière
<ul></ul><p>I know starbox (<a class="external" href="http://www.nickstakenburg.com/projects/starbox/">http://www.nickstakenburg.com/projects/starbox/</a>) at least won't work in this case (all js compacted in one all.js file).</p>
<p>Thx<br />Philippe</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=44632008-08-25T07:49:40ZJan Losinski
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>Can you provide me your browser version and Operating system version? The context menu and issue links are working fine for me in Firefox. Also make sure you've cleared the browser cache.</p>
</blockquote>
<p>The cache was cleared, the Problem exist until I remove <em>:cache => true</em><br />Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)<br />Rails: 2.1.0<br />Ruby: 1.8.2<br />libjs-prototype: 1.6.0.2</p>
<p>Rails runs in a apache-fcgid environment.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45412008-08-27T18:06:39ZEric Davis
<ul></ul><p>Jan Losinski wrote:</p>
<blockquote>
<p>The cache was cleared, the Problem exist until I remove <em>:cache => true</em><br />Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)<br />Rails: 2.1.0<br />Ruby: 1.8.2<br />libjs-prototype: 1.6.0.2</p>
<p>Rails runs in a apache-fcgid environment.</p>
</blockquote>
<p>I tested with the exact same browser and the context menu is working for me. In fact the context menu isn't included in the cached JavaScript so it shouldn't be affected at all.</p>
<p>Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45502008-08-28T10:44:46ZRalph Lange
<ul></ul>I'm having the same problem: upgrading from <a class="changeset" title="No warning about rcov each time a rake task is ran." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1747">r1747</a> to <a class="changeset" title="Javascripts are now cached into a single file for downloads in production mode. Thanks to Philip..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1748">r1748</a> breaks a bunch of things in my installation:
<ul>
<li>Wiki formatting buttons disappear (for project descriptions, issues, comments...)</li>
<li>The preview link does not work (when creating or commenting an issue)</li>
<li>Issue filtering does no work: parts of filter expressions are missing, adding filters does not work, listing all issues (including closed) does not work, ...</li>
</ul>
<p>I tried migrating the db, clearing the redmine cache and clearing the browser cache with no result.</p>
<p>Removing ":cache => true" puts everything back to normal.</p>
<p>Rails 2.1.0, ruby 1.8.5<br />Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45512008-08-28T11:40:58ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I think the problem is due to the fact that your application can't write <code>all.js</code> in <code>/public/javascripts</code> folder because the app doesn't have write access on this repository. And thus, all javascripts are unavailable.</p>
<p>I personnally use this cache technique for a while here on redmine.org but everyone may not want to give write access to the app on the <code>/public</code> folder. So IMHO, this patch should be reverted.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45522008-08-28T12:34:46ZJan Losinski
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I think the problem is due to the fact that your application can't write <code>all.js</code> in <code>/public</code> folder because the app doesn't have write access on this repository.</p>
</blockquote>
<p>On my Box, <code>all.js</code> exist in <code>/public/javascripts</code> and RoR can write to it, but it's an empty file.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45532008-08-28T12:42:59ZPhilippe Lafoucrière
<ul></ul><p>Ok, seeing all the problems this patch is raising, and the very little improvement, we can clearly reject the patch. Sorry for that guys.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45562008-08-28T16:31:02ZEric Davis
<ul><li><strong>Target version</strong> deleted (<del><i>0.8</i></del>)</li></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I think the problem is due to the fact that your application can't write <code>all.js</code> in <code>/public/javascripts</code> folder because the app doesn't have write access on this repository. And thus, all javascripts are unavailable.</p>
</blockquote>
<p>Ah, didn't even think about that since my Redmine runs as the user who owns the files. So it was able to write to public.</p>
<p>Philippe Lafoucrière wrote:</p>
<blockquote>
<p>Ok, seeing all the problems this patch is raising, and the very little improvement, we can clearly reject the patch. Sorry for that guys.</p>
</blockquote>
<p>Don't worry about it, that's what trunk is for, trying out new features. I tested it myself and it worked great in my environment so I committing the patch.</p>
<p>I've reverted the commit. Can everyone who had an issue please update to <a class="changeset" title="Reverting commit r1748. Some environments are not allowing the cached file to write to public, ca..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1771">r1771</a> and see if the problem is reverted. Sorry for the hassle.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=45642008-08-28T22:14:18ZPaul Rivier
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>I've reverted the commit. Can everyone who had an issue please update to <a class="changeset" title="Reverting commit r1748. Some environments are not allowing the cached file to write to public, ca..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1771">r1771</a> and see if the problem is reverted. Sorry for the hassle.</p>
</blockquote>
<p>If the problem may occur on some installations, and is server side configuration issue, it does not make the feature proposed unusable for everybody. Can't it just be let as an option for site administrator ?</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=46582008-09-08T15:18:10ZRichard Hurt
<ul></ul><p>It looks like <a class="changeset" title="Merged hooks branch @ r1785 into trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1786">r1786</a> turned this back on somehow and my installation is broken. Can we get this turned back off please or is there some other fix in place that allows it to be toggled on/off?</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=46772008-09-09T21:00:22ZNorbert Wenzel
<ul></ul><p>Has this been turned on again in rev1794? I was just wondering what those bugs were, which occured every now and then, and disappeared after reloading. I had to change the folder permissions for "javascripts" and now Redmine is working with JS support again.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=46812008-09-10T00:11:33ZEric Davis
<ul></ul><p>Richard Hurt wrote:</p>
<blockquote>
<p>It looks like <a class="changeset" title="Merged hooks branch @ r1785 into trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1786">r1786</a> turned this back on somehow and my installation is broken. Can we get this turned back off please or is there some other fix in place that allows it to be toggled on/off?</p>
</blockquote>
<p>The merge from the hooks branch in <a class="changeset" title="Merged hooks branch @ r1785 into trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1786">r1786</a> pulled in the bug. If you update to <a class="changeset" title="Reverting commit r1748 again. r1786 pulled in in again" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1795">r1795</a>, I've backed it out.</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=47262008-09-12T18:39:48ZRichard Hurt
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>Richard Hurt wrote:</p>
<blockquote>
<p>It looks like <a class="changeset" title="Merged hooks branch @ r1785 into trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1786">r1786</a> turned this back on somehow and my installation is broken. Can we get this turned back off please or is there some other fix in place that allows it to be toggled on/off?</p>
</blockquote>
<p>The merge from the hooks branch in <a class="changeset" title="Merged hooks branch @ r1785 into trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1786">r1786</a> pulled in the bug. If you update to <a class="changeset" title="Reverting commit r1748 again. r1786 pulled in in again" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1795">r1795</a>, I've backed it out.</p>
</blockquote>
<p>Thanks, that did the trick.</p>
<p>Later...<br /> Richard</p> Redmine - Patch #1186: JS should be cached in production mode to save bandwith and cpuhttps://www.redmine.org/issues/1186?journal_id=50042008-10-02T00:57:03ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Assignee</strong> deleted (<del><i>Eric Davis</i></del>)</li></ul><p>Closing, we can revisit caching later as part of a more comprehensive optimization strategy.</p>