[#23657] [Bug #1550] String#lstrip! raises RuntimeError on Frozen String Despite Making No Changes — Run Paint Run Run <redmine@...>
Bug #1550: String#lstrip! raises RuntimeError on Frozen String Despite Making No Changes
Hi,
On Jun 1, 2009, at 5:07 PM, Yukihiro Matsumoto wrote:
Hi,
Issue #1550 has been updated by Yukihiro Matsumoto.
This change seems to break the build on my machine:
[#23683] [Bug #1560] multi core operations are slower on trunk (possible regression) — David Cuadrado <redmine@...>
Bug #1560: multi core operations are slower on trunk (possible regression)
[#23700] Standard Ruby bytecode — Ioannis Nousias <s0238762@...>
I came across this post:
[#23717] [Bug #1573] $0 behaves unexpectedly — Morris Brodersen <redmine@...>
Bug #1573: $0 behaves unexpectedly
[#23727] [Bug #1580] TestIOScanF failure in windows — Roger Pack <redmine@...>
Bug #1580: TestIOScanF failure in windows
[#23729] [Bug #1583] Time + String no Longer Raises TypeError? — Run Paint Run Run <redmine@...>
Bug #1583: Time + String no Longer Raises TypeError?
Issue #1583 has been updated by Akira Tanaka.
Hi,
Excerpts from Yukihiro Matsumoto's message of Sun Jun 07 17:07:06 +0300 2009:
[#23738] Ducktyping interface — Yehuda Katz <wycats@...>
Matz,
[#23753] [Bug #1587] Problem with string sharing — Quet Zal <redmine@...>
Bug #1587: Problem with string sharing
[#23770] [Bug #1595] rake unusable on windows install — Robert Gonzalez <redmine@...>
Bug #1595: rake unusable on windows install
[#23815] inheriting socket in child process on native Windows — "Knutaf" <knutaf@...>
Hello,
> This works on Linux by persisting socket.fileno from the parent process a=
Well, I'm already not exactly using pure Ruby, since I'm wrapping
> Besides that, I think using WSADuplicateSocket will suffer from the
I tried that with both the HANDLE value and with an fd value that I
> I tried that with both the HANDLE value and with an fd value that I
[#23842] request for updated ri/rdoc on 1.8.7 branch — Roger Pack <rogerdpack@...>
would it be possible to get a newer version of ri/rdoc installed on
[#23845] [Bug #1627] Kernel.require Should Canonicalise Paths — Run Paint Run Run <redmine@...>
Bug #1627: Kernel.require Should Canonicalise Paths
[#23849] [Bug #1629] [Segfault] z = Zlib::GzipReader.new segfaults — Markus Fischer <redmine@...>
Bug #1629: [Segfault] z = Zlib::GzipReader.new segfaults
[#23850] instance_eval no longer yielding self in ruby 1.9 — apeiros <apeiros@...>
Hi folks
Hi,
Am 16.06.2009 um 22:12 schrieb Yusuke ENDOH:
Am 17.06.2009 um 00:01 schrieb Florian Gilcher:
[#23869] [Bug #1640] [PATCH] Documentation for the Rational Class — Run Paint Run Run <redmine@...>
Bug #1640: [PATCH] Documentation for the Rational Class
[#23878] trouble registering and logging in to the issue tracking system — Knutaf H <knutaf@...>
Hi,
[#23883] Merging recent Ruby threading improvements — Joe Damato <ice799@...>
Hi ruby-core and CC'ed friends -
[#23934] [Bug #1661] RegExp mismatch — Adam Carheden <redmine@...>
Bug #1661: RegExp mismatch
[#23950] [Bug #1668] Error installing ruby gems for 1.9.1 on windows vista — Kristian Mandrup <redmine@...>
Bug #1668: Error installing ruby gems for 1.9.1 on windows vista
[#23977] [ANN] meeting log of RubyDeveloperKaigi20090622 — "Yugui (Yuki Sonoda)" <yugui@...>
Hi,
Thanks for the update. :-)
On Jun 23, 2009, at 4:23 AM, Run Paint Run Run wrote:
Sorry for late response,
On Tue, Jul 7, 2009 at 12:12 AM, NARUSE, Yui<[email protected]> wrote:
On Mon, Jul 6, 2009 at 10:18 PM, Luis Lavena<[email protected]> wrote:
Charles Oliver Nutter wrote:
I agree pretty much across the board. I was actually hoping that
Charles Oliver Nutter wrote:
2009/6/23 Yugui (Yuki Sonoda) <[email protected]>
2009/6/23 Yugui (Yuki Sonoda) <[email protected]>:
On Wed, Jul 1, 2009 at 3:20 PM, Charles Oliver
[#23986] possible bug with windows `` they don't set $? — Roger Pack <rogerdpack@...>
Looks like a bug? [1.8 or 1.9]
[#23988] [Bug #1680] URI.encode does not encode '+' (by default) — Xuân Baldauf <redmine@...>
Bug #1680: URI.encode does not encode '+' (by default)
[#23997] [Bug #1681] Integer#chr Should Infer Encoding of Given Codepoint — Run Paint Run Run <redmine@...>
Bug #1681: Integer#chr Should Infer Encoding of Given Codepoint
Hi,
>> This seems needlessly verbose given that Ruby already knows
[#24007] [Bug #1684] ruby/rubyw.rc still say 1.9.1 — Roger Pack <redmine@...>
Bug #1684: ruby/rubyw.rc still say 1.9.1
[#24010] [Bug #1685] Some windows unicode path issues remain — B Kelly <redmine@...>
Bug #1685: Some windows unicode path issues remain
Issue #1685 has been updated by B Kelly.
Issue #1685 has been updated by Yuki Sonoda.
Yuki Sonoda wrote:
Hi,
Hello,
U.Nakamura wrote:
Hello,
U.Nakamura wrote:
Hello,
Hi,
Hello,
Hi,
Hello,
[#24025] [Bug #1688] Zlib raises a buffer error when inflating some kinds of data — Luis Lavena <redmine@...>
Bug #1688: Zlib raises a buffer error when inflating some kinds of data
Issue #1688 has been updated by Roger Pack.
On Thu, Jun 25, 2009 at 10:28 AM, Roger Pack<[email protected]> wrote:
[#24032] [Bug #1690] backticks don't set $? in windows — Roger Pack <redmine@...>
Bug #1690: backticks don't set $? in windows
[#24033] [Bug #1691] ruby --help doesn't display the "skip rubygems" option — Roger Pack <redmine@...>
Bug #1691: ruby --help doesn't display the "skip rubygems" option
[#24050] 1.9.2 Should Pass RubySpec Before Release — Run Paint Run Run <runrun@...>
I humbly suggest that a prerequisite of 1.9.2 being released is that
[#24058] [Bug #1696] http downloads are unuseably slow — Steven Hartland <redmine@...>
Bug #1696: http downloads are unuseably slow
Issue #1696 has been updated by Steven Hartland.
Net/HTTP in 1.9.2dev is already working as you described with two
In article <[email protected]>,
Excerpts from Tanaka Akira's message of Mon Jun 29 21:17:58 +0300 2009:
On Jun 29, 2009, at 1:38 PM, Eero Saynatkari wrote:
[#24063] [Feature #1697] Object#<=> — Marc-Andre Lafortune <redmine@...>
Feature #1697: Object#<=>
Issue #1697 has been updated by Rick DeNatale.
Excerpts from Luiz Angelo Daros de Luca's message of Sun Jun 28 16:22:45 +0300 2009:
[#24069] [ANN] RubyInstaller: Building installers story and news — Luis Lavena <luislavena@...>
Hey guys,
[#24099] [Bug #1708] require 'complex' Causes Unexpected Behaviour — Run Paint Run Run <redmine@...>
Bug #1708: require 'complex' Causes Unexpected Behaviour
[ruby-core:24058] [Bug #1696] http downloads are unuseably slow
Bug #1696: http downloads are unuseably slow
http://redmine.ruby-lang.org/issues/show/1696
Author: Steven Hartland
Status: Open, Priority: High
ruby -v: ruby 1.8.6 (2008-08-11 patchlevel 287) [amd64-freebsd7]
I've been using a a bit of code which use open-uri and http urls to download files and have found this is unuseably slow.
Example:
require 'open-uri'
open( <http uri> )
I did some benchmarking and the download of a 157MB file from the local machine was taking over 20 seconds and using 100% where as wget for the same file only took 0.7seconds.
Digging some more and profiling the code with RubyProf revealed that during the execution of the download over 11,000 threads where being created. This I've tracked down to the net/protocol module and the Net::BufferIO::rbuf_fill method which is using a timeout block to wrap the @io.sysread(1024) call. This is clearly an extremely bad way to do this, totally crippling the performance.
Below are benchmarks and some profiles of this issue and various quick fixes I tested here
== 1.8.6 core ==
user system total real
open 15.664062 6.164062 21.828125 ( 22.810859)
%self total self wait child calls name
14.04 5.27 3.00 2.27 0.00 109426 <Class::Thread>#start (ruby_runtime:0}
10.97 13.14 2.34 0.00 10.80 109427 <Module::Timeout>#timeout (/usr/local/lib/ruby/1.8/timeout.rb:52}
6.65 2.52 1.42 1.10 0.00 109426 Thread#kill (ruby_runtime:0}
5.78 21.36 1.23 0.00 20.12 1 Net::BufferedIO#read (/usr/local/lib/ruby/1.8/net/protocol.rb:79}
5.27 14.27 1.12 0.00 13.14 109427 Object#timeout (/usr/local/lib/ruby/1.8/timeout.rb:92}
5.12 1.11 1.09 0.02 0.00 109426 IO#sysread (ruby_runtime:0}
4.75 2.61 1.02 0.00 1.59 109426 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
3.40 3.62 0.73 0.00 2.89 109426 Net::ReadAdapter#call_block (/usr/local/lib/ruby/1.8/net/protocol.rb:380}
2.52 0.54 0.54 0.00 0.00 109435 String#slice! (ruby_runtime:0}
2.30 1.33 0.49 0.00 0.84 109415 #<Class:0x801ac6f30>#<< ((eval):1}
2.08 0.50 0.45 0.00 0.05 109427 Class#initialize (ruby_runtime:0}
2.08 0.98 0.45 0.00 0.54 109435 Net::BufferedIO#rbuf_consume (/usr/local/lib/ruby/1.8/net/protocol.rb:137}
2.01 4.05 0.43 0.00 3.62 109426 Net::ReadAdapter#<< (/usr/local/lib/ruby/1.8/net/protocol.rb:371}
1.94 0.41 0.41 0.00 0.00 109416 IO#write (ruby_runtime:0}
1.72 1.03 0.37 0.00 0.66 109435 Class#new (ruby_runtime:0}
1.50 0.32 0.32 0.00 0.00 328286 String#size (ruby_runtime:0}
1.32 14.55 0.28 0.00 14.27 109426 Net::BufferedIO#rbuf_fill (/usr/local/lib/ruby/1.8/net/protocol.rb:131}
1.21 0.84 0.26 0.00 0.58 109417 Kernel#__send__ (ruby_runtime:0}
1.13 0.24 0.24 0.00 0.00 109429 String#<< (ruby_runtime:0}
0.99 0.30 0.21 0.00 0.09 109428 Fixnum#== (ruby_runtime:0}
0.84 0.18 0.18 0.00 0.00 328289 Fixnum#+ (ruby_runtime:0}
0.77 0.16 0.16 0.00 0.00 109427 <Class::Class>#allocate (ruby_runtime:0}
0.77 0.58 0.16 0.00 0.41 109415 IO#<< (ruby_runtime:0}
0.73 0.28 0.16 0.00 0.12 109475 Hash#[] (ruby_runtime:0}
...
== 1.8.6 core + no timeout block ==
user system total real
open 1.757812 0.765625 2.523438 ( 2.873194)
%self total self wait child calls name
21.62 2.63 2.63 0.00 0.00 109426 IO#sysread (ruby_runtime:0}
15.72 1.91 1.91 0.00 0.00 109429 String#<< (ruby_runtime:0}
13.98 1.70 1.70 0.00 0.00 109416 IO#write (ruby_runtime:0}
9.56 12.16 1.16 0.00 10.99 1 Net::BufferedIO#read (/usr/local/lib/ruby/1.8/net/protocol.rb:79}
7.83 3.73 0.95 0.00 2.77 109426 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
5.58 4.68 0.68 0.00 4.00 109426 Net::ReadAdapter#call_block (/usr/local/lib/ruby/1.8/net/protocol.rb:385}
3.66 4.99 0.45 0.00 4.55 109426 Net::BufferedIO#rbuf_fill (/usr/local/lib/ruby/1.8/net/protocol.rb:138}
3.34 2.38 0.41 0.00 1.97 109415 #<Class:0x801ac82b8>#<< ((eval):1}
3.27 0.53 0.40 0.00 0.13 109435 Net::BufferedIO#rbuf_consume (/usr/local/lib/ruby/1.8/net/protocol.rb:142}
2.95 5.04 0.36 0.00 4.68 109426 Net::ReadAdapter#<< (/usr/local/lib/ruby/1.8/net/protocol.rb:376}
2.25 0.27 0.27 0.00 0.00 328289 Fixnum#+ (ruby_runtime:0}
1.54 0.19 0.19 0.00 0.00 328286 String#size (ruby_runtime:0}
1.28 0.27 0.16 0.00 0.12 109475 Hash#[] (ruby_runtime:0}
1.22 0.15 0.15 0.00 0.00 109431 Module#=== (ruby_runtime:0}
1.22 1.85 0.15 0.00 1.70 109415 IO#<< (ruby_runtime:0}
1.09 0.13 0.13 0.00 0.00 109435 String#slice! (ruby_runtime:0}
0.96 1.97 0.12 0.00 1.85 109417 Kernel#__send__ (ruby_runtime:0}
0.96 0.12 0.12 0.00 0.00 109426 String#length (ruby_runtime:0}
0.96 0.12 0.12 0.00 0.00 109435 Hash#default (ruby_runtime:0}
0.71 0.09 0.09 0.00 0.00 109439 Fixnum#< (ruby_runtime:0}
...
== 1.8.6 core + no timeout block + 10K sysread ==
user system total real
open 0.570312 1.406250 1.976562 ( 2.521614)
%self total self wait child calls name
27.32 0.39 0.39 0.00 0.00 10953 String#slice! (ruby_runtime:0}
18.58 0.27 0.27 0.00 0.00 10943 IO#write (ruby_runtime:0}
12.02 0.17 0.17 0.00 0.00 10944 IO#sysread (ruby_runtime:0}
8.74 1.42 0.12 0.00 1.30 1 Net::BufferedIO#read (/usr/local/lib/ruby/1.8/net/protocol.rb:79}
7.10 0.50 0.10 0.00 0.40 10944 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
5.46 0.37 0.08 0.00 0.29 10942 #<Class:0x801ac8b28>#<< ((eval):1}
3.28 0.05 0.05 0.00 0.00 32840 String#size (ruby_runtime:0}
2.73 0.55 0.04 0.00 0.52 10944 Net::ReadAdapter#call_block (/usr/local/lib/ruby/1.8/net/protocol.rb:385}
2.73 0.04 0.04 0.00 0.00 32843 Fixnum#+ (ruby_runtime:0}
2.73 0.59 0.04 0.00 0.55 10944 Net::ReadAdapter#<< (/usr/local/lib/ruby/1.8/net/protocol.rb:376}
1.64 0.21 0.02 0.00 0.19 10944 Net::BufferedIO#rbuf_fill (/usr/local/lib/ruby/1.8/net/protocol.rb:138}
1.64 0.41 0.02 0.00 0.39 10953 Net::BufferedIO#rbuf_consume (/usr/local/lib/ruby/1.8/net/protocol.rb:142}
1.09 0.02 0.02 0.00 0.00 10944 String#length (ruby_runtime:0}
1.09 0.02 0.02 0.00 0.00 10947 String#<< (ruby_runtime:0}
1.09 0.02 0.02 0.00 0.00 10953 Hash#default (ruby_runtime:0}
1.09 0.28 0.02 0.00 0.27 10942 IO#<< (ruby_runtime:0}
...
== 1.8.6 core + no timeout block + 100K sysread ==
user system total real
open 0.390625 0.484375 0.875000 ( 1.013516)
%self total self wait child calls name
45.45 0.43 0.43 0.00 0.00 1098 IO#sysread (ruby_runtime:0}
33.88 0.32 0.32 0.00 0.00 1097 IO#write (ruby_runtime:0}
8.26 0.08 0.08 0.00 0.00 1107 String#slice! (ruby_runtime:0}
1.65 0.45 0.02 0.00 0.44 1098 Net::BufferedIO#rbuf_fill (/usr/local/lib/ruby/1.8/net/protocol.rb:138}
1.65 0.02 0.02 0.00 0.00 3302 String#size (ruby_runtime:0}
1.65 0.35 0.02 0.00 0.34 1098 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
1.65 0.93 0.02 0.00 0.91 1 Net::BufferedIO#read (/usr/local/lib/ruby/1.8/net/protocol.rb:79}
0.83 0.01 0.01 0.00 0.00 1 URI::HTTP#initialize (/usr/local/lib/ruby/1.8/uri/http.rb:77}
0.83 0.09 0.01 0.00 0.08 1107 Net::BufferedIO#rbuf_consume (/usr/local/lib/ruby/1.8/net/protocol.rb:142}
0.83 0.01 0.01 0.00 0.00 357 Module#method_added (ruby_runtime:0}
0.83 0.01 0.01 0.00 0.00 37 <Class::Dir>#[] (ruby_runtime:0}
0.83 0.01 0.01 0.00 0.00 1101 String#<< (ruby_runtime:0}
0.83 0.36 0.01 0.00 0.35 1098 Net::ReadAdapter#call_block (/usr/local/lib/ruby/1.8/net/protocol.rb:385}
0.83 0.33 0.01 0.00 0.32 1096 IO#<< (ruby_runtime:0}
...
== 1.8.6 core + no timeout block + 1M sysread ==
user system total real
open 0.445312 0.335938 0.781250 ( 0.913736)
%self total self wait child calls name
29.66 0.27 0.27 0.00 0.00 157 IO#sysread (ruby_runtime:0}
28.81 0.27 0.27 0.00 0.00 166 String#slice! (ruby_runtime:0}
28.81 0.27 0.27 0.00 0.00 156 IO#write (ruby_runtime:0}
7.63 0.07 0.07 0.00 0.00 160 String#<< (ruby_runtime:0}
1.69 0.30 0.02 0.00 0.28 157 Net::ReadAdapter#call_block (/usr/local/lib/ruby/1.8/net/protocol.rb:385}
0.85 0.01 0.01 0.00 0.00 37 <Class::Dir>#[] (ruby_runtime:0}
0.85 0.01 0.01 0.00 0.00 98 Class#inherited (ruby_runtime:0}
0.85 0.02 0.01 0.00 0.02 2 Kernel#gem_original_require (ruby_runtime:0}
0.85 0.28 0.01 0.00 0.27 157 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
...
== 1.8.6 core + no timeout block + 1M sysread + slice bypass ==
user system total real
open 0.093750 0.523438 0.617188 ( 0.717748)
%self total self wait child calls name
66.67 0.23 0.23 0.00 0.00 52 IO#write (ruby_runtime:0}
13.33 0.05 0.05 0.00 0.00 52 IO#sysread (ruby_runtime:0}
4.44 0.02 0.02 0.00 0.00 55 String#<< (ruby_runtime:0}
4.44 0.02 0.02 0.00 0.00 1 TCPSocket#initialize (ruby_runtime:0}
2.22 0.01 0.01 0.00 0.00 101 Hash#[] (ruby_runtime:0}
2.22 0.01 0.01 0.00 0.00 10 String#slice! (ruby_runtime:0}
2.22 0.02 0.01 0.00 0.01 2 Kernel#gem_original_require (ruby_runtime:0}
2.22 0.25 0.01 0.00 0.24 52 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
2.22 0.01 0.01 0.00 0.00 37 <Class::Dir>#[] (ruby_runtime:0}
...
Note: The change does also raises questions about the core slice method not performing as well as it might for the no-op case.
== 1.8.6 core + select timeout + 1M sysread + slice bypass ==
user system total real
open 0.070312 0.226562 0.296875 ( 0.898285)
%self total self wait child calls name
64.10 0.20 0.20 0.00 0.00 49 IO#write (ruby_runtime:0}
15.38 0.05 0.05 0.00 0.00 49 IO#sysread (ruby_runtime:0}
7.69 0.02 0.02 0.00 0.00 52 String#<< (ruby_runtime:0}
5.13 0.23 0.02 0.00 0.21 49 OpenURI::Buffer#<< (/usr/local/lib/ruby/1.8/open-uri.rb:297}
2.56 0.02 0.01 0.00 0.02 2 Kernel#gem_original_require (ruby_runtime:0}
2.56 0.01 0.01 0.00 0.00 37 <Class::Dir>#[] (ruby_runtime:0}
2.56 0.02 0.01 0.00 0.01 3 Array#each (ruby_runtime:0}
...
So overall these changes improve the speed from 22seconds to 0.7seconds in my test case making ruby comparable with wget's performance.
The patch for this last run is attached and should be compatible with existing functionality through the use of select + raise Timeout::Error instead of timeout( @read_timeout ) { .. }
Hope this helps, any questions let me know
----------------------------------------
http://redmine.ruby-lang.org