ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: tenderlove@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:63606] [ruby-trunk - Bug #10015] Performance regression in Dir#[]
Date: Wed, 09 Jul 2014 15:25:04 +0000	[thread overview]
Message-ID: <redmine.journal-47662.20140709152503.5be01be02fb5365b@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-10015.20140708174351@ruby-lang.org

Issue #10015 has been updated by Aaron Patterson.


@nobu this change causes a significant increase in Rails boot time on my system.

My application pays a 120ms price for this change.  @hsbt will pay 520ms:

  http://twitter.com/hsbt/status/486378979138367488

Is there a way we can keep the performance on case-insensitive file systems?  If there really is no work-around, then we need to make some changes in RubyGems, bundler, minitest, and Rails before trunk is released because many people will complain about slow boot times. :(

----------------------------------------
Bug #10015: Performance regression in Dir#[]
https://bugs.ruby-lang.org/issues/10015#change-47662

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-02-04 trunk 44802) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
r44802 seems to have introduced a performance regression in Dir#[].

Here is the test program:

~~~ruby
require 'benchmark'

puts Benchmark.realtime {
  glob = "minitest/*_plugin.rb{,.rb,.bundle}"
  $LOAD_PATH.map { |load_path|
    Dir["#{File.expand_path glob, load_path}"]
  }.flatten.select { |file| File.file? file.untaint }
}
~~~

Here is the test time for me:

~~~
$ ruby -v test.rb
ruby 2.2.0dev (2014-02-04 trunk 44801) [x86_64-darwin13.0]
0.000341
$ ruby -v test.rb
ruby 2.2.0dev (2014-02-04 trunk 44802) [x86_64-darwin13.0]
0.009333
~~~

r44801 seems much faster than r44802.



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2014-07-09 15:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-10015.20140708174351@ruby-lang.org>
2014-07-08 17:43 ` [ruby-core:63591] [ruby-trunk - Bug #10015] [Open] Performance regression in Dir#[] tenderlove
2014-07-09  8:08 ` [ruby-core:63599] [ruby-trunk - Bug #10015] " nobu
2014-07-09 15:25 ` tenderlove [this message]
2014-07-09 18:34   ` [ruby-core:63610] " Eric Wong
2014-07-09 15:59 ` [ruby-core:63607] " nobu
2014-07-09 16:05 ` [ruby-core:63608] " tenderlove
2014-07-09 18:43 ` [ruby-core:63611] " normalperson
2014-12-24 12:55 ` [ruby-core:67102] [ruby-trunk - Bug #10015] [Closed] " nobu
2014-12-24 18:15 ` [ruby-core:67104] [ruby-trunk - Bug #10015] " nagachika00
2014-12-25  0:58 ` [ruby-core:67116] " matthew
2014-12-25  4:39 ` [ruby-core:67119] " nobu
2015-03-27 23:20 ` [ruby-core:68660] [Ruby trunk " adrien.siami
2015-03-28  2:43 ` [ruby-core:68665] [Ruby trunk - Bug #10015] [Feedback] " nobu
2015-03-30 10:00 ` [ruby-core:68684] [Ruby trunk - Bug #10015] " adrien.siami
2015-06-08 11:03 ` [ruby-core:69492] " karklinsh
2015-07-01 14:28 ` [ruby-core:69832] " daniel
2016-04-06 14:54 ` [ruby-core:74832] [Ruby trunk Bug#10015] " layon1993

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-47662.20140709152503.5be01be02fb5365b@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).