vmware-archive / rbvmomi

Ruby interface to the VMware vSphere API.
MIT License
302 stars 175 forks source link

Use require_relative instead of require to speed up requires #175

Closed tas50 closed 4 years ago

tas50 commented 4 years ago

require_relative is faster as it doesn't require traversing the filesystem looking for the require.

See benchmarks here: https://github.com/rspec/rspec-expectations/pull/476#issuecomment-35848905

Signed-off-by: Tim Smith tsmith@chef.io

jrgarcia commented 4 years ago

I'd love to merge this, but unfortunately the library currently still supports Ruby 1.8.7. I'm going to leave this open because I plan to drop support for all non-stable Ruby versions. Once I do that, I'll merge this in. I'm not sure when I'll have the time to do it, but I'd love to do that soon.

Fryguy commented 4 years ago

Ruby 1.8.7 was dropped in #178

jrgarcia commented 4 years ago

Only the CI support was dropped. Support for 1.8.7 is still in the library itself https://github.com/vmware/rbvmomi/blob/master/rbvmomi.gemspec#L32

tas50 commented 4 years ago

@jrgarcia any update on dropping Ruby 1.8.7 support?

jrgarcia commented 4 years ago

I'll plan on doing this today.

tas50 commented 4 years ago

Thanks @jrgarcia

jrgarcia commented 4 years ago

No problem! Sorry it took so long! I'm changing a couple more things and then I'll push out a new major Gem release.

jrgarcia commented 4 years ago

Thanks so much for this! Just pushed rbvmomi v3 to RubyGems with these changes.