Project

General

Profile

Actions

Bug #7778

closed

Irb loading generates 17x more open/stat system calls when a locale is set

Added by lzap (Lukas Zapletal) almost 12 years ago. Updated over 11 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 2.0.0dev (2013-01-07 trunk 38733) [x86_64-linux]
Backport:
[ruby-core:51829]

Description

Hello,

I did just found out that when I have a locale set (e.g. cs_CZ in my case), irb does some extra finding for rb/so files which are being required. That slows down loading time and if you have many rubygems, loading can be really slow.

$ LC_ALL=cs_CZ strace irb < /dev/null 2>&1 | grep ENOENT | wc -l
5195

$ LC_ALL=C strace irb < /dev/null 2>&1 | grep ENOENT | wc -l
293

$ time LC_ALL=cs_CZ irb < /dev/null
real 0m0.262s
user 0m0.165s
sys 0m0.023s

$ time LC_ALL=C irb < /dev/null
real 0m0.084s
user 0m0.066s
sys 0m0.014s

Tested on stable 1.9.3 and also on 2.0 RC1. All the same.

Updated by ko1 (Koichi Sasada) almost 12 years ago

  • Category set to lib
  • Assignee set to keiju (Keiju Ishitsuka)
  • Target version set to 2.6

Is it only for irb?
Same as Ruby command?

Updated by keiju (Keiju Ishitsuka) almost 12 years ago

Irb search directories of RUBY_PATH for irb message locale files, if LC_ALL etc. is set.

Therefore, this is not a bug.

Updated by keiju (Keiju Ishitsuka) over 11 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0