As of v2.1.3, our slim/agent binary size is pretty big:
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:
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.
As of
v2.1.3, our slim/agent binary size is pretty big:With a bit of hacking (essentially preventing the
coderdpackage from being imported when building the slim binary and eliminating a few other imports), I was able to get the size down significantly: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.