Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a mechanism to invoke toys without rubygems for better performance #27

Open
dazuma opened this issue Feb 20, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dazuma
Copy link
Owner

dazuma commented Feb 20, 2020

Toys can now be run in a Ruby VM that does not have Rubygems loaded up-front. So there's the potential of about 50ms faster startup if we can disable Rubygems. However, Toys is currently installed as a gem, and the Rubygems provides the frontend for its executable.

Create a mechanism to invoke Toys in a Ruby that has Rubygems disabled. This would be particularly useful for the shell completion scripts, which are sensitive to startup time.

Some initial ideas:

  • Rewrite the completion script to bypass the Rubygems executable and invoke Ruby directly with --disable=gems. There are some complications here, notably if the user installs a new version of Toys, or changes the current Ruby using a tool such as rbenv, the completion script might end up pointing at an old Toys installation.
  • Provide a system command that installs an alternate bin "pinning" to the current Toys installation (although this may exhibit the same complications).
  • Experiment with using a non-Ruby script as the executable. Not sure what Rubygems will do with such an executable, though.
@dazuma dazuma added enhancement New feature or request target: 0.11.x labels Feb 20, 2020
@dazuma dazuma added this to the 0.11 milestone Feb 23, 2020
@dazuma dazuma modified the milestones: 0.11, 0.12 Aug 21, 2020
@dazuma dazuma modified the milestones: 0.12, 0.13 Jul 21, 2021
@dazuma dazuma removed this from the 0.13 milestone Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant