Disable JavaScript debugging in development
While debugging JavaScript is certainly useful, enabling it generates about 100 extra HTTP requests because we include about 100 JavaScript files (including external dependencies and files written by us). Depending on the browser configuration, this might make the browser take a very long time processing these requests. On my machine, with these changes, refreshing a page on Firefox takes about 1 second, while previously it took about 6-8 seconds. With Chromium, there doesn't seem to be much difference. Developers are encouraged to temporarily turn debugging while debugging JavaScript (which is a task I personally do about once a month) if that makes debugging easier for them. This change doesn't affect our CSS files, since for CSS we use Sass instead of the asset pipeline. Sass already compiles all CSS files into one in the development environment.
This commit is contained in:
@@ -48,7 +48,7 @@ Rails.application.configure do
|
||||
# Debug mode disables concatenation and preprocessing of assets.
|
||||
# This option may cause significant delays in view rendering with a large
|
||||
# number of complex assets.
|
||||
config.assets.debug = true
|
||||
config.assets.debug = false
|
||||
|
||||
# Adds additional error checking when serving assets at runtime.
|
||||
# Checks for improperly declared sprockets dependencies.
|
||||
|
||||
Reference in New Issue
Block a user