Skip to content

Decrease size of coder slim binary #9380

Closed
@mafredri

Description

@mafredri

As of v2.1.3, our slim/agent binary size is pretty big:

68M coder*
23M coder.gz*

With a bit of hacking (essentially preventing the coderd package from being imported when building the slim binary and eliminating a few other imports), I was able to get the size down significantly:

33M coder*
12M coder.gz*

The size was essentially halved. Reducing the size of the slim binary here should help reduce the full binary (with coder server) size as well, albeit to a lesser extent (via reduced size of bundled slim binaries). First entry into workspaces via e.g. VSCode or JetBrains extensions should also be faster.

This will require a bit of refactoring in multiple places, essentially pulling out shared types from packages that would also pull in coderd.

This issue is for tracking the progress as we slowly make small changes to prevent pulling in all that weight.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions