Skip to content

rayfin --help is unexpectedly slow compared to subcommand help #26

Description

@christopheranderson

Context

Split from #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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingissue-mappedIssue is mapped to internal trackertriaged

Type

No type
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