rugged icon indicating copy to clipboard operation
rugged copied to clipboard

gem slow to install

Open codedeleter opened this issue 4 years ago • 1 comments

I'm on mac and this gem took me over a minute to install.

% time gem install rugged      
Fetching rugged-1.3.0.gem
Building native extensions. This could take a while...
Successfully installed rugged-1.3.0
Parsing documentation for rugged-1.3.0
Installing ri documentation for rugged-1.3.0
Done installing documentation for rugged after 1 seconds
1 gem installed
gem install rugged  63.66s user 19.57s system 88% cpu 1:34.32 total

It's the "Building native extensions" part that takes up most of the time. I haven't seen many gems take this long to install. Is there any way to get this faster? Is this just my machine? Is it this slow on linux too?

codedeleter avatar Dec 21 '21 21:12 codedeleter

This is configuring and building libgit2 and then rugged. It is bound to take longer than others, as most gems would not build the underlying C library. You can make this faster if you have libgit2 installed on your system by linking against that, but it does require that the versions match.

See https://github.com/libgit2/rugged/blob/0f1753da0fe9fb75264be58c2d5a2055763e6125/ext/rugged/extconf.rb#L63 for where that is selected

carlosmn avatar Jan 14 '22 14:01 carlosmn