Project

General

Profile

Actions

Bug #2382

closed

test_process.rb runs very slowly

Added by hongli (Hongli Lai) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-11-18) [x86_64-darwin10.2.0]
Backport:
[ruby-core:26807]

Description

=begin
Ever since revision 25835, test_process.rb runs very slowly, sometimes appearing to completely freeze. Problem can be reproduced by running this command in the Ruby 1.9 sources:

./ruby -v test/ruby/test_process.rb -v

Watch it spending multiple seconds on every test, eventually appearing to freeze at one of the tests.

Reverting revision 25835 solves the problem.
=end

Actions #1

Updated by hongli (Hongli Lai) over 14 years ago

=begin
I'm running on OS X Snow Leopard, if that matters.
=end

Actions #2

Updated by methodmissing (Lourens Naudé) over 14 years ago

=begin
Same behavior - latest trunk, Snow Leopard

Here's dtruss output until the first stall while running "make test" :

https://gist.github.com/9a7a5f20b581c0bcf8b7
=end

Actions #3

Updated by methodmissing (Lourens Naudé) over 14 years ago

=begin
Further investigation identified an issue with loading the UTF8-MAC encoding, essentially incurring multiple stat + failed open syscalls per call to file_path_convert

The static var utf8mac_encoding is never set :

VALUE
file_path_convert(VALUE name)
{
rb_encoding *fname_encoding = rb_enc_from_index(ENCODING_GET(name));
rb_encoding *fs_encoding = rb_filesystem_encoding();
#ifdef APPLE
static rb_encoding *utf8mac_encoding;
if (!utf8mac_encoding)
utf8mac_encoding = rb_enc_find("UTF8-MAC");

http://gist.github.com/239992
=end

Actions #4

Updated by naruse (Yui NARUSE) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r25878.
Hongli, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0