Speed up touching, make shell escaping more robust. #48

Merged
merged 1 commit into from Jan 6, 2013

Conversation

Projects
None yet
2 participants
Contributor

oggy commented Jan 6, 2013

Shellwords is part of the ruby stdlib, and built for proper shell escaping.

The touch command can receive multiple files, and can even ignore nonexistent files with the POSIX-compliant -c option. Doing 1000 files per invocation dramatically sped up this phase of precompilation for me. On an app with just under 7k files under public/assets:

Before:

$ bundle exec rake RAILS_ENV=development RAILS_GROUPS=assets assets:precompile
touching (nil): 88.8947s
compiling (nil): 70.7533s
touching (false): 0.0000s
generating (false): 6.5764s

After:

$ bundle exec rake RAILS_ENV=development RAILS_GROUPS=assets assets:precompile
touching (nil): 0.9903s
compiling (nil): 68.2418s
touching (false): 0.0000s
generating (false): 6.4802s

ndbroadbent added a commit that referenced this pull request Jan 6, 2013

Merge pull request #48 from oggy/fast-touching
Speed up touching, make shell escaping more robust.

@ndbroadbent ndbroadbent merged commit 8bc8007 into ndbroadbent:master Jan 6, 2013

1 check passed

default The Travis build passed
Details
Owner

ndbroadbent commented Jan 6, 2013

Awesome, thanks!! I've released 0.3.5 with your change.

@oggy oggy deleted the oggy:fast-touching branch Jan 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment