Skip to content

tk decreases load speed of others gems loading after it #26

Description

@hupeng2006

If tk is loaded firstly, gems after it would take a long time to load. This becomes extreme with gem rubyXL. Here is the result:

############## first require tk, then rubyXL
t0 = Time.now
require 'tk'
puts Time.now - t0 # 1.35 secs
t0 = Time.now
require 'rubyXL'
puts Time.now - t0 # 58.6 secs

############## first require rubyXL, then tk
t0 = Time.now
require 'rubyXL'
puts Time.now - t0 # 0.28 secs
t0 = Time.now
require 'tk'
puts Time.now - t0 # 2.8 secs

my app use tk as gui. When I use ruby 2.3.1, I do not see this issue. After I upgrade to ruby 2.7.2, the issue shows up. And now I downgrade to ruby 2.6.6, the issue is still there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions