Re:Reducing Tailscale’s binary size on macOS
by zacwest on Friday February 17, 2023 @10:58AM
(#34836163)
Generally on Apple platforms the move here would be putting the shared binary into a dynamic .framework rather then trying to eliminate the shared dependency. Is this a limitation of authoring it in Go that it has to be entirely static?
[ Parent
| on HN ]
Re:Reducing Tailscale’s binary size on macOS
by hn_go_brrrrr on Friday February 17, 2023 @11:44AM
(#34836953)
It could also be a legacy of a lot of the team coming from Google, which statically links everything except glibc.
Re:Reducing Tailscale’s binary size on macOS
by xxpor on Friday February 17, 2023 @05:16PM
(#34841370)
I'm surprised Google isn't using musl then at this point.
Re:Reducing Tailscale’s binary size on macOS
by favorited on Friday February 17, 2023 @07:11PM
(#34842402)
They were spearheading the LLVM libc project at one point, I'd assume they'd replace glibc with that if anything.
Re:Reducing Tailscale’s binary size on macOS
by saagarjha on Saturday February 18, 2023 @02:26AM
(#34844809)
Musl is slow.
Re:Reducing Tailscale’s binary size on macOS
by mihaip on Friday February 17, 2023 @12:08PM
(#34837294)
(I’m the author of the post)
The solution we ended up with was partially a matter of the minimum change to fix the issue, and partly because we have a lot of platforms to cover with a small team, so the fewer platform-specific concepts we have (frameworks in this case), the easier it is to maintain.
Re:Reducing Tailscale’s binary size on macOS
by manmal on Friday February 17, 2023 @01:55PM
(#34838763)
As a user I’d prefer faster startup over shaving off a couple MB tbh.
Re:Reducing Tailscale’s binary size on macOS
by hansvm on Friday February 17, 2023 @02:56PM
(#34839624)
Even if so that takes benchmarking on the target systems. Linking can be fast compared to reading a few extra MB from disk.
Re:Reducing Tailscale’s binary size on macOS
by manmal on Friday February 17, 2023 @04:38PM
(#34840917)
With SSDs approaching 10GB/s reads, I think that’s negligible.
Re:Reducing Tailscale’s binary size on macOS
by saagarjha on Friday February 17, 2023 @03:47PM
(#34840325)
Calling dlopen is perhaps one of the slowest way to bring in libraries on Darwin.
Re:Reducing Tailscale’s binary size on macOS
by mihaip on Friday February 17, 2023 @04:01PM
(#34840512)
What would you recommend? dlopen is only used when running in CLI mode (which is not super performance sensitive), but not making it slower than it needs to be would be good too.