Skip to content

bug: coder binary starts really slowly on Windows #17717

Open
@spikecurtis

Description

@spikecurtis

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running coder on Windows takes a long time, even for what should be an instantaneous result like parsing arguments. I measure it as over 1 second.

This results in a poor user experience: CLI commands are needlessly slow, and things that depend on it, like the IDE extensions or Coder Desktop take a long time to connect to workspaces.

It is unclear why there is this delay, and it appears mainly on Windows. It also isn't just some Go thing, as a minimal "hello world" Go app completes in tens of ms.

Relevant Log Output

C:\Users\micha> Measure-Command { coder something }
Encountered an error running "coder", see "coder --help" for more information
error: unrecognized subcommand "something"

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 1
Milliseconds      : 326
Ticks             : 13266690
TotalDays         : 1.53549652777778E-05
TotalHours        : 0.000368519166666667
TotalMinutes      : 0.02211115
TotalSeconds      : 1.326669
TotalMilliseconds : 1326.669

Expected Behavior

coder should add a negligible (< 100ms) overhead compared with the actual command being run.

Steps to Reproduce

Run a coder command on Windows

Environment

  • Host OS: Windows 11
  • Coder version: Coder v2.20.0-devel+17f8e93d0

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that require triages3Bugs that confuse, annoy, or are purely cosmetic

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions