From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 7CA091F5AE for ; Tue, 4 Aug 2020 10:13:51 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E19FD120A91; Tue, 4 Aug 2020 19:13:18 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id A0355120A90 for ; Tue, 4 Aug 2020 19:13:16 +0900 (JST) Received: by filterdrecv-p3las1-559bd7b968-l9bgl with SMTP id filterdrecv-p3las1-559bd7b968-l9bgl-19-5F2934D3-14 2020-08-04 10:13:39.269956231 +0000 UTC m=+489449.937050449 Received: from herokuapp.com (unknown) by ismtpd0052p1iad1.sendgrid.net (SG) with ESMTP id MEWrvQfjR6a-2BwAc2xRPg for ; Tue, 04 Aug 2020 10:13:39.053 +0000 (UTC) Date: Tue, 04 Aug 2020 10:13:39 +0000 (UTC) From: gamelinks007@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 75306 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17101 X-Redmine-Issue-Author: fitmap X-Redmine-Sender: S_H_ X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?hkhH+VYi3CHo0H3puLbdQ20XoWHmZIf5UShlDYZVe97cOqSLku57Ut+l+TxplK?= =?us-ascii?Q?5QDIRrrExBlcCRy6HTQWf5FHPtTFzsCMItznyk3?= =?us-ascii?Q?j3+SSIm+COFre8fNVL7blHmBcipATjWZCSMp0TA?= =?us-ascii?Q?p6=2FlQ8otQwcgay+AK5IWupNF5ge6=2FujNYKFFx2=2F?= =?us-ascii?Q?G=2Fr1z+NhYiOTyRqzjfkwPV2AZCyK2cf0ZqlyBok?= =?us-ascii?Q?Re6sOZrmCTonm5BQc=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 99476 Subject: [ruby-core:99476] [Ruby master Bug#17101] YAML.load_file: Massive slowdown under Ruby 2.7 vs. Ruby 2.4 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17101 has been updated by S_H_ (Shun Hiraoka). I tried this benchmark in several ruby's(Ubuntu18.04 in WSL2. using `rbenv`). ```yaml prelude: | require 'yaml' benchmark: load_file: YAML.load_file('qlnv_h_h.yaml') loop_count: 1 ``` And, result. ```bash sh@MyComputer:~/rubydev/bugs$ benchmark-driver yml.yaml --output compare --rbenv '2.4.4;2.5.8;2.6.6;2.7.1;2.8.0-dev' Calculating ------------------------------------- 2.4.4 2.5.8 2.6.6 2.7.1 2.8.0-dev load_file 0.113 0.075 0.076 0.058 0.134 i/s - 1.000 times in 8.839451s 13.406090s 13.240691s 17.256679s 7.435239s Comparison: load_file 2.8.0-dev: 0.1 i/s 2.4.4: 0.1 i/s - 1.19x slower 2.6.6: 0.1 i/s - 1.78x slower 2.5.8: 0.1 i/s - 1.80x slower 2.7.1: 0.1 i/s - 2.32x slower ``` Between `2.5` and `2.7` is slow, but `master(2.8.9-dev)` is very fast(faster than `2.4`!). And checked `yaml` versions(in theseruby's). | Ruby version | YAML version | |:--:|:--:| |2.8.0-dev | 0.2.5 | |2.7.1 | 0.2.1 | |2.6.6 | 0.2.1 | |2.5.8 | 0.1.7 | |2.4.4 | 0.1.7 | ---------------------------------------- Bug #17101: YAML.load_file: Massive slowdown under Ruby 2.7 vs. Ruby 2.4 https://bugs.ruby-lang.org/issues/17101#change-86931 * Author: fitmap (Justin Peal) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- When use Ruby 2.4, the following program runs fast, After ungrade to Ruby 2.7, the same program runs very very slow. Please unzip the attach first for test. require 'yaml' YAML.load_file('qlnv_h_h.yaml') ---Files-------------------------------- qlnv_h_h.7z (1.41 MB) -- https://bugs.ruby-lang.org/