`rayfin --help` is unexpectedly slow compared to subcommand help
Open
@mksuni is already working on this.
Since Jun 11, 2026.
bug
issue-mapped
triaged
- Dominant language
- No language data
- Stars
- 610
- Forks
- 62
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 3
Description
Context
Split from https://github.com/microsoft/rayfin/issues/24 (sub-issue 2 of 4).
Problem
Running rayfin --help takes a noticeably long time to render output, while rayfin docs --help renders quickly. The slowness appears specific to the top-level --help path and hurts the first impression of the CLI.
Expected Behavior
rayfin --help should render as fast as subcommand help (e.g., rayfin docs --help).
Investigation Notes
Likely causes:
- Top-level help may be eagerly loading all subcommand modules before rendering
- Possible network calls (e.g., update checks) blocking the help output
- Heavy module initialization that isn't needed for help display
Suggested Fix
- Lazy-load subcommand modules (only load when actually invoked, not for
--help) - Defer any network calls (update checks, telemetry) until after help is rendered
- Profile the startup path to identify the bottleneck
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.