From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 7310917DB067 for ; Sat, 28 Mar 2015 11:35:37 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 2DE1EB5D881 for ; Sat, 28 Mar 2015 11:44:03 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 6D5A497A827 for ; Sat, 28 Mar 2015 11:44:04 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ES-yB0kvzFEi for ; Sat, 28 Mar 2015 11:44:04 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 3144497A826 for ; Sat, 28 Mar 2015 11:44:04 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 9036295243A for ; Sat, 28 Mar 2015 11:44:01 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id BC84E120513; Sat, 28 Mar 2015 11:43:58 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 5582B1204FE for ; Sat, 28 Mar 2015 11:43:55 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=F7CketJ5OuYlB6DtmqAnzRJV6DI=; b=oZc3Rn1+NiVpxY8wQY lcGdZoox8kpSRmZDnOe45fugdTir/Tak7w0P/EUba0lFxLJVUNNea0ckCWu1KlXq Pm1vaeKWc2fykK7awixlUh6m7vG0OW7EQfE+kUlSBImGIVIq6Rw9UVWBYoEKklCM 6NwQZvEiTWW6YXmKsofYbGG+s= Received: by filter0434p1mdw1.sendgrid.net with SMTP id filter0434p1mdw1.4318.551615683 2015-03-28 02:43:52.461610099 +0000 UTC Received: from herokuapp.com (ec2-54-196-63-41.compute-1.amazonaws.com [54.196.63.41]) by ismtpd-050 (SG) with ESMTP id 14c5e439fb0.90c1.6224ef Sat, 28 Mar 2015 02:43:52 +0000 (UTC) Date: Sat, 28 Mar 2015 02:43:51 +0000 From: nobu@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 43073 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10015 X-Redmine-Issue-Author: tenderlovemaking X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7iFaZokNbl9K6nfMGF7dBlPdb8QrLXLcVg9a lPV2/ESiTNhsHJRDehvYNU/i2tdahPHoZp932TuY6LSKt/h4fXepQcrjEt0kRmF5QBKRN1D9AeJU5u VrAcnJ8T625WyCl3WHC6hLI3N4ul9V73HqZ5 X-ML-Name: ruby-core X-Mail-Count: 68665 Subject: [ruby-core:68665] [Ruby trunk - Bug #10015] [Feedback] Performance regression in Dir#[] X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10015 has been updated by Nobuyoshi Nakada. Status changed from Closed to Feedback Adrien Siami wrote: > A slow page was running in 16 seconds with 2.2.1 where it was running in less than 3 seconds with 2.1.5 > it runs in 3.1289695860032225 secs with 2.2.1 and 2.403 secs with 2.1.5 What's your platform and filesystem? As the former seems pretty bigger than the later, they may be caused by different reasons. ---------------------------------------- Bug #10015: Performance regression in Dir#[] https://bugs.ruby-lang.org/issues/10015#change-51958 * Author: Aaron Patterson * Status: Feedback * Priority: Normal * Assignee: * 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/