microsoft / microsoft/rayfin

`rayfin --help` is unexpectedly slow compared to subcommand help

Open
#26 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.