Skip to content

Performance: Slow CLI Startup Times on Windows Compared to MacOS #100

@bhouston

Description

@bhouston

Slow CLI Startup Times on Windows Compared to MacOS

Description

The CLI tool (mycoder or when using pnpm cli) has significantly slower startup times on Windows compared to MacOS. The delay appears to occur during initialization, before the agent even begins to run.

Expected Behavior

CLI startup times should be comparable across operating systems.

Current Behavior

  • Windows: Noticeable delay during startup
  • MacOS: Fast startup

Possible Contributing Factors

  • Node.js module loading differences between platforms
  • Sentry initialization overhead
  • File system operations that might be slower on Windows
  • Dependencies that might have platform-specific performance characteristics

Proposed Solutions

  1. Add profiling capabilities to identify bottlenecks:

    • Add a --profile flag to measure and output timing data for each initialization step
    • Instrument key parts of the startup sequence with performance measurements
    • Consider using Node.js built-in performance APIs
  2. Investigate common Windows performance issues:

    • Check for file system operations that might be optimized
    • Evaluate if lazy-loading certain modules could improve startup time
    • Review Sentry initialization and consider deferring it when not needed

Additional Information

The issue is specifically with the startup time before the agent begins running, suggesting the problem is in the CLI initialization phase rather than in the agent execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions