https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112010-02-09T01:35:05ZRuby Issue Tracking SystemBackport187 - Backport #2722: gets on a large file takes a very very long timehttps://redmine.ruby-lang.org/issues/2722?journal_id=82172010-02-09T01:35:05Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>=begin<br>
Hi,</p>
<p>In message "Re: <a href="/issues/2722">[ruby-core:28103]</a> [Bug <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: gets on a large file takes a very very long time (Closed)" href="https://redmine.ruby-lang.org/issues/2722">#2722</a>] gets on a large file takes a very very long time"<br>
on Mon, 8 Feb 2010 17:33:09 +0900, Greg Hazel <a href="mailto:redmine@ruby-lang.org" class="email">redmine@ruby-lang.org</a> writes:</p>
<p>|This problem occurs on 1.8.6, 1.8.7 and 1.9.1 (all the versions I tested)</p>
<p>I could reproduce the problem on 1.9, but not on 1.8. 1.9 has been<br>
fixed by r26622. Thank you for the report.</p>
<pre><code> matz.
</code></pre>
<p>=end</p> Backport187 - Backport #2722: gets on a large file takes a very very long timehttps://redmine.ruby-lang.org/issues/2722?journal_id=82422010-02-10T07:45:41Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>=begin<br>
Hi,</p>
<p>In message "Re: <a href="https://blade.ruby-lang.org/ruby-core/28138">[ruby-core:28138]</a> Re: [Bug <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: gets on a large file takes a very very long time (Closed)" href="https://redmine.ruby-lang.org/issues/2722">#2722</a>] gets on a large file takes a very very long time"<br>
on Wed, 10 Feb 2010 06:09:54 +0900, Roger Pack <a href="mailto:rogerdpack2@gmail.com" class="email">rogerdpack2@gmail.com</a> writes:</p>
<p>|For me it performs fast when I replace .gets with .read<br>
|Perhaps there is a reason for this?</p>
<p>gets need to scan for the newline. Here's my numbers</p>
<p>ruby 1.9.2dev (2010-02-09 trunk 26623) [i686-linux]<br>
gets: 0.13s user 0.42s system 88% cpu 0.626 total<br>
read: 0.08s user 0.46s system 93% cpu 0.578 total</p>
<p>ruby 1.8.8dev (2010-02-07 revision 26612) [i486-linux]<br>
gets: 2.54s user 0.44s system 97% cpu 3.073 total<br>
read: 2.47s user 0.45s system 97% cpu 3.007 total</p>
<p>1.8 has bottleneck on String#times, maybe we can work on it.</p>
<pre><code> matz.
</code></pre>
<p>=end</p> Backport187 - Backport #2722: gets on a large file takes a very very long timehttps://redmine.ruby-lang.org/issues/2722?journal_id=82662010-02-12T11:21:59Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>3</i></li></ul><p>=begin</p>
<p>=end</p> Backport187 - Backport #2722: gets on a large file takes a very very long timehttps://redmine.ruby-lang.org/issues/2722?journal_id=795022019-07-15T15:58:49Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Backport</i></li><li><strong>Project</strong> changed from <i>Ruby 1.8</i> to <i>Backport187</i></li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/79502/diff?detail_id=52956">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>ruby -v</strong> deleted (<del><i>ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]</i></del>)</li></ul>