Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't fork a process when assets:precompile:nondigest is invoked in assets:precompile:all. #4350

Merged
merged 1 commit into from

2 participants

@kennyj
Collaborator

This PR is a improvement for GH #3694.
Memory consumption will be reduced if we execute assets:precompile .

Please see also #3694

@josevalim josevalim merged commit d0cd74c into rails:master
@josevalim
Owner

Please send another one for 3-2-stable as well? :)

@kennyj
Collaborator

@josevalim I sent this PR for 3-2-stable. #4352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2012
  1. @kennyj

    Don't fork a process when assets:precompile:nondigest is invoked in a…

    kennyj authored
    …ssets:precompile:all. Improve GH #3694.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/sprockets/assets.rake
View
6 actionpack/lib/sprockets/assets.rake
@@ -1,12 +1,12 @@
require "fileutils"
namespace :assets do
- def ruby_rake_task(task)
+ def ruby_rake_task(task, fork = true)
env = ENV['RAILS_ENV'] || 'production'
groups = ENV['RAILS_GROUPS'] || 'assets'
args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"]
args << "--trace" if Rake.application.options.trace
- ruby(*args)
+ fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args)
end
# We are currently running with no explicit bundler group
@@ -59,7 +59,7 @@ namespace :assets do
# required in order to compile digestless assets as the
# environment has already cached the assets on the primary
# run.
- ruby_rake_task "assets:precompile:nondigest" if Rails.application.config.assets.digest
+ ruby_rake_task("assets:precompile:nondigest", false) if Rails.application.config.assets.digest
end
task :primary => ["assets:environment", "tmp:cache:clear"] do
Something went wrong with that request. Please try again.