Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

first try on faster bundle exec ruby #2118

Closed
wants to merge 1 commit into from

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Oct 6, 2012

as per discussion in #2117

normal ruby:
time ruby -rbundler/setup -e 'puts "foo"' --> 2.3s

bundle exec with patch:
time bundle exec ruby -e 'puts "foo"' --> 2.9s

bundle exec without patch:
time bundle exec ruby -e 'puts "foo"' --> 4.0s

the time diff in case 2 is because rubygems is loaded once for the executable and once for the exec ruby run. Getting rid of it like the hub gem does might be a solution, but still kind of nasty...

I'm trying to preserve the original ARGV, so that e.g. ruby -e '' does not blow up, maybe there is a better way of doing this...

@ghost
Copy link

ghost commented Nov 1, 2012

How can I help test this pull request? I'd really like to see that speed improvement in bundler! :)

@indirect
Copy link
Member

indirect commented Nov 1, 2012

@Rohit, I guess just by applying this patch and doing some benchmarking on bundle exec? I'm going to try to test this out myself soon.

@ghost ghost assigned indirect Nov 1, 2012
@grosser
Copy link
Contributor Author

grosser commented Nov 1, 2012

just cleaned it up a bit by using exec with multiple arguments :)

@indirect
Copy link
Member

This patch only speeds things up if you're running bundle exec ruby foo. I don't know about you, but that basically never happens to me or anyone that I have ever seen use Bundler. In fact, if you're running bundle exec ruby foo, why not just run ruby -rbundler/setup foo? It seems like it's going to provide the same result.

@grosser
Copy link
Contributor Author

grosser commented Nov 20, 2012

that's exactly the point :D
afaik most people do not know that they are the same and I was never 100%
sure that they are,
and I know plenty people and scripts that run bundle exec ruby foo

On Mon, Nov 19, 2012 at 3:39 PM, André Arko [email protected]:

This patch only speeds things up if you're running bundle exec ruby foo.
I don't know about you, but that basically never happens to me or anyone
that I have ever seen use Bundler. In fact, if you're running bundle exec
ruby foo, why not just run ruby -rbundler/setup foo? It seems like it's
going to provide the same result.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2118#issuecomment-10536469.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants