The goal of this project is to obsolete itself and improve Ruby itself.
This RubyGem /may/ improve the performance of net/* libraries under
(matz) Ruby 1.9.3+. If there is any benefit, large (memory-footprint)
applications stand more to gain than smaller ones.
Avoids expensive exceptions in Net::BufferedIO#rbuf_fill
Avoids temporary classes which invalidate VM caches on GC
Avoids (some) GC thrashing by reusing a temporary buffer
Won’t improve performance if using SSL connections
Only net/http and net/smtp are tested for now.
== Things To Avoid When Using This
Avoid using Timeout.timeout at all (always :P).
Avoid using temporary Class objects on your own, this causes internal
VM caches to be invalidated when Classes are garbage-collected
Avoid using Timeout.timeout without an explicit exception class,
Timeout.timeout will generate a temporary Classes.
Avoid defining/redefining methods/constants once your application is
running, you’ll have temporary singleton Classes this way.
This is only supported on mainline Ruby 1.9.3+ on Unix-like systems.
- gem install net-wrong
This depends on the following gems (which RubyGems should take care of):
All you need to do is require the appropriate module and continue
using your existing Net::* code as usual. For Net::HTTP users,
If you’re using Net::SMTP:
…And similar for the (untested) net/wrong/telnet and net/wrong/pop
- git clone git://bogomips.org/net-wrong
If you like web browsers, you can also view the source with a web
- net-http-persistent - manages persistent connections for Net::HTTP
This reduces the use of terrible_timeout.
Feedback (results, bug reports, patches, pull-requests) is very much
For issues/bugs/patches/pull-requests/improvements specific to this
itself, email the mailing list [email protected] or
Eric W. [email protected]. Please send plain-text mail, HTML
will not be read.