1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/net
normal 752faf4fb4 net/http: use require_relative to reduce syscalls
require_relative speeds up loading of files by reducing path
lookups.  On a clean install with RubyGems-enabled,
"ruby -rnet/http -e exit" shows a reduction in failed open(2)
syscalls from 410 to 350 (x86-64 GNU/Linux).

I could not measure a time difference on my Linux-based
machines, however this should be noticeable to users of other
kernels with worse syscall and VFS performance than Linux.

Further use of require_relative will reduce lookups in other
places.

* lib/net/http.rb: use require_relative
  [ruby-core:78285] [Feature #12973]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24 01:22:08 +00:00
..
http Fixed misspelling words. 2017-10-22 11:27:06 +00:00
ftp.rb Fix warning: assigned but unused variable 2017-10-17 11:58:51 +00:00
http.rb net/http: use require_relative to reduce syscalls 2017-10-24 01:22:08 +00:00
https.rb
imap.rb lib/net/imap.rb: Accept continuation requests without response text 2017-08-27 06:32:00 +00:00
pop.rb Fix variable name in example of net/pop 2017-08-02 15:10:42 +00:00
protocol.rb lib/net/protocol.rb: account read_bytes before caller sees it 2017-05-22 07:36:00 +00:00
smtp.rb Use unpack1 instead of unpack and [0] 2017-07-20 23:34:03 +00:00