Feature #1024

Remove unneeded .js files to speed page load

Added by W Snyder over 12 years ago. Updated almost 8 years ago.

Status:NewStart date:2008-04-09
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:

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

History

#1 Updated by Rocco Stanzione over 12 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.

#2 Updated by Daniel Felix almost 8 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.

Also available in: Atom PDF