summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorMisaki Shioi <[email protected]>2024-12-14 15:51:19 +0900
committerGitHub <[email protected]>2024-12-14 15:51:19 +0900
commit9f924e2f13992241c447190a9eb139bf46dcb8d9 (patch)
treeac6acd2fa5b2fe57d895266a762999343c3ae160 /man
parent77016a7b4341d861b83e222c18333204b63f480b (diff)
Improve APIs for Globally Enabling/Disabling fast_fallback in Socket (#12257)
This change includes the following updates: - Added an environment variable `RUBY_TCP_NO_FAST_FALLBACK` to control enabling/disabling fast_fallback - Updated documentation and man pages - Revised the implementation of Socket.tcp_fast_fallback= and Socket.tcp_fast_fallback, which previously performed dynamic name resolution of constants and variables. As a result, the following performance improvements were achieved: (Case of 1000 executions of `TCPSocket.new` to the local host) Rehearsal ----------------------------------------- before 0.031462 0.147946 0.179408 ( 0.249279) after 0.031164 0.146839 0.178003 ( 0.346935) -------------------------------- total: 0.178003sec user system total real before 0.027584 0.138712 0.166296 ( 0.233356) after 0.025953 0.127608 0.153561 ( 0.237971)
Notes
Notes: Merged-By: shioimm <[email protected]>
Diffstat (limited to 'man')
-rw-r--r--man/ruby.111
1 files changed, 11 insertions, 0 deletions
diff --git a/man/ruby.1 b/man/ruby.1
index b1b8e42401..b058acab97 100644
--- a/man/ruby.1
+++ b/man/ruby.1
@@ -776,6 +776,17 @@ a program (or script) that is to be executed.
.Pp
The pipe template is split on spaces into an argument list before the
template parameters are expanded.
+.Sh MISC ENVIRONMENT
+.Pp
+.Bl -hang -compact -width "RUBY_TCP_NO_FAST_FALLBACK"
+.It Ev RUBY_TCP_NO_FAST_FALLBACK
+If set to
+.Li 1 ,
+disables the fast fallback feature by default in TCPSocket.new and Socket.tcp.
+When set to
+.Li 0
+or left unset, the fast fallback feature is enabled.
+Introduced in Ruby 3.4, default: unset.
.Sh SEE ALSO
.Bl -hang -compact -width "https://www.ruby-toolbox.com/"
.It Lk https://www.ruby-lang.org/