Feature #1024
openRemove unneeded .js files to speed page load
0%
Description
I'm finding the load of the first page by a user is very slow over medium speed links. I think this is simply due to the fact that base.rhtml includes 5 javascript files, which are 172KB in size.
I wonder if any of these could be disabled? For example, is there any drag-and-drop in redmine?
If they're all needed, perhaps they can be all "cat"ed together to improve performance? I've done this with the .css files already to good benefit.
BTW, see for example
http://infovore.org/archives/2006/07/11/javascript_include_tag-defaults-considered-harmful/
which came up in my quest to understand how rails deals with javascript_include_tag.
Thanks
Updated by Rocco Stanzione over 16 years ago
+1 for the potential performance benefit. We don't even get to cache the javascripts, even going through a caching proxy, because Rails deliberately prevents it by appending a timestamp to the filenames. We could omit js includes from layouts/base altogether and make use of <%= yield :header_tags %> to allow each view to specify which .js files it needs.
Updated by Daniel Felix about 12 years ago
Has this thing already be reviewed?
In the past 4 years there some been many commits. This should be checked, maybe a Modernizr implementation would be helpful to help the migration to HTML5 and CSS3. This way, there could be some lazy loading JS implementation. Just as an idea.