ruby/lib
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
..
bundler Fixed broken `bundle gem` command. 2017-10-05 08:32:01 +00:00
cgi Fix cgi/core code example missing comma 2017-08-02 15:10:38 +00:00
drb Make ACL::ACLEntry not suppress IPAddr::InvalidPrefixError 2017-10-21 09:53:52 +00:00
forwardable forwardable/impl.rb 2016-11-20 02:12:48 +00:00
irb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
matrix get rid of ambiguous parentheses warnings 2016-11-29 16:06:54 +00:00
net net/http: use require_relative to reduce syscalls 2017-10-24 01:22:08 +00:00
optparse optparse/kwargs.rb 2016-10-14 13:26:13 +00:00
racc Fixed misspelling words. 2017-10-22 11:27:06 +00:00
rdoc * remove trailing spaces. 2017-10-10 02:01:01 +00:00
rexml fix documentation of REXML::Formatters::Default (id_hack -> ie_hack) [ci skip] 2017-08-14 16:04:35 +00:00
rinda Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
rss rss itunes: fix a bug that <itunes:explicit> value isn't fully supported 2017-10-22 16:03:57 +00:00
rubygems Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4). 2017-10-20 09:03:37 +00:00
shell Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
unicode_normalize update Ruby to Unicode 10.0.0 2017-09-06 07:56:41 +00:00
uri Use caller with length to reduce unused strings 2017-10-21 14:40:03 +00:00
webrick webrick: fix up r60172 and r60210 2017-10-18 23:34:02 +00:00
yaml * lib/yaml/store.rb (YAML::Store#dump): use table argument instead of @table directly. 2016-09-29 14:40:34 +00:00
English.rb `$IGNORECASE` is no longer effective. [ci skip] 2017-08-25 15:47:04 +00:00
abbrev.rb lib/abbrev.rb: Specify frozen_string_literal: true. 2017-02-09 16:12:00 +00:00
base64.rb Use `unpack1` instead of `unpack` and `first` 2017-02-10 00:58:47 +00:00
benchmark.rb lib/benchmark.rb: Specify frozen_string_literal: true. 2017-01-03 02:00:01 +00:00
bundler.gemspec Fixed broken `bundle gem` command. 2017-10-05 08:32:01 +00:00
bundler.rb Merge bundler to standard libraries. 2017-09-08 08:45:41 +00:00
cgi.rb {lib,test}/cgi: Specify frozen_string_literal: true. 2017-02-18 05:52:16 +00:00
cmath.gemspec Update gemspec for gem released versions. 2017-09-14 02:01:36 +00:00
cmath.rb lib/cmath.rb: Specify frozen_string_literal: true. 2017-01-04 05:47:52 +00:00
csv.gemspec Merge csv-0.1.0 from upstream. 2017-09-12 08:38:06 +00:00
csv.rb Merge csv-0.1.0 from upstream. 2017-09-12 08:38:06 +00:00
debug.rb lib/debug.rb: Specify frozen_string_literal: true. 2017-01-05 01:00:01 +00:00
delegate.rb Use caller with length to reduce unused strings 2017-10-21 14:40:03 +00:00
drb.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
e2mmap.rb lib/e2mmap.rb: Specify frozen_string_literal: true. 2017-03-01 11:37:30 +00:00
erb.rb erb.rb: specify frozen_string_literal: true 2017-10-21 15:02:46 +00:00
fileutils.gemspec Make string literal to frozen object on gemspec of defulte gems. 2017-06-19 13:03:06 +00:00
fileutils.rb Overwrite destination symlink file if `remove_destination` is set. 2017-10-20 07:03:11 +00:00
find.rb Find.find -> Use Dir.children instead of Dir.entries 2017-09-15 17:00:49 +00:00
forwardable.rb forwardable.rb: fix branches 2017-01-03 09:47:16 +00:00
getoptlong.rb getoptlong.rb: multiline regexps 2017-09-02 02:05:34 +00:00
ipaddr.gemspec Import ipaddr 1.2.0 2017-10-21 13:34:19 +00:00
ipaddr.rb Use caller with length to reduce unused strings 2017-10-21 14:40:03 +00:00
irb.rb Removed obsoleted safe level checks on irb. 2017-10-21 14:11:08 +00:00
logger.rb logger.rb: Fix handling progname 2017-07-20 16:47:26 +00:00
matrix.rb Use caller with length to reduce unused strings 2017-10-21 14:40:03 +00:00
mkmf.rb mkmf.rb: get rid of error messages 2017-02-27 07:37:55 +00:00
monitor.rb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
mutex_m.rb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
observer.rb lib/observer.rb: Specify frozen_string_literal: true. 2017-01-13 12:08:29 +00:00
open-uri.rb lib/open-uri.rb: accept :encoding option as well as encoding in mode string. 2017-10-21 06:22:53 +00:00
open3.rb lib/open3.rb: accept IO-like object for :stdin_data argument. 2017-10-21 07:00:58 +00:00
optionparser.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
optparse.rb optparse.rb: case-sensitive candidate 2017-07-24 01:56:04 +00:00
ostruct.rb ostruct.rb: improve fix for OpenStruct.allocate + #respond_to? 2017-04-01 10:30:48 +00:00
pp.rb Refactored using Method#owner. 2017-04-04 12:54:42 +00:00
prettyprint.rb * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
prime.rb prime.rb: remove alias after timeout test 2017-05-20 10:21:44 +00:00
profile.rb lib/profile.rb: Specify frozen_string_literal: true. 2017-01-15 02:56:04 +00:00
profiler.rb lib/profiler.rb: Specify frozen_string_literal: true. 2017-01-18 12:35:10 +00:00
pstore.rb lib/pstore.rb: Specify frozen_string_literal: true. 2017-01-17 12:47:38 +00:00
rdoc.rb Removed obsoleted test for RubyToken. 2017-10-10 04:54:49 +00:00
resolv-replace.rb * lib/resolv-replace.rb: Specify frozen_string_literal: true. 2015-11-14 08:25:30 +00:00
resolv.rb Fixed unexpected behavior of `Resolv::MDNS#each_address` when given ".local" address. 2017-10-21 13:58:31 +00:00
rss.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
rubygems.rb Merge rubygems-2.6.14 changes. 2017-10-10 08:58:22 +00:00
scanf.gemspec Update gemspec for gem released versions. 2017-09-14 02:01:36 +00:00
scanf.rb Fix bug about String#scanf("%a") 2017-10-21 12:34:13 +00:00
securerandom.rb less random generations in Random::Formatter#choose. 2017-10-21 16:12:46 +00:00
set.rb Add `Set#reset` 2017-10-22 12:25:34 +00:00
shell.rb shell.rb: suppress warnings 2016-11-05 23:58:02 +00:00
shellwords.rb Fix the handling of the backslash in double quotes 2016-11-05 04:58:48 +00:00
singleton.rb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
sync.rb * lib/sync.rb: Fix NameError when error. 2016-09-18 10:24:48 +00:00
tempfile.rb tempfile.rb: [DOC] all arguments [ci skip] 2017-10-17 12:40:00 +00:00
thwait.rb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
time.rb Make Time.parse respect timezone offset seconds 2017-10-20 01:03:18 +00:00
timeout.rb fix a typo [ci skip] 2016-09-07 12:32:02 +00:00
tmpdir.rb * lib/tmpdir.rb: Unify to coding-style for method definition. 2016-02-26 02:11:14 +00:00
tracer.rb Remove unnecessary `require 'thread'` 2017-10-08 07:00:01 +00:00
tsort.rb * lib/tsort.rb: Specify frozen_string_literal: true. 2015-11-14 08:46:11 +00:00
un.rb un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new 2017-07-05 09:05:53 +00:00
uri.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
weakref.rb [DOC] Use Integer instead of Fixnum [ci skip] 2017-01-26 15:14:02 +00:00
webrick.rb [DOC] Fix typos 2015-12-23 03:43:23 +00:00
yaml.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00