We built a background daemon as a macOS menu bar app in Go, and the performance was surprisingly bad. The Go bindings for native UI frameworks ended up being massive RAM hogs. When we profiled it, we found that the GC essentially gave up under load, which explained why customers were reporting a simple menu bar app consuming 2.5GB+ of RAM on their Macs. We eventually abandoned the Go approach and switched to Electron…
Build desktop applications using Go and Web Technologies
51–60 of 82 posts
Re: Build desktop applications using Go and Web Technologies
#52The lengths we will go to avoid writing a proper desktop application.
because there is no proper UI library that does cross platform as well as the web
Re: Build desktop applications using Go and Web Technologies
#53Re: Build desktop applications using Go and Web Technologies
#54Earlier quoted context omitted.
> When we profiled it, we found that the GC essentially gave up under load Hmm, the Go GC is really quite capable, so I wonder what kind of pathological load it was being presented with. Even then, when the GC "fails" it means elevated CPU load from collection. The main thing I can think of would be the application "leaking" by having unintentional references (or worse, actually leaking through cgo bindings), or tras…
I totally agree :) I don't blame Go either. We were already a pure Go shop with a lot of focus on backend and infra systems engineering and were trying to venture into the desktop app market for our device monitoring software. Once we validated our idea with a rather buggy MVP haha, we quickly switched over to Electron and deployed on all 3 desktop OSes properly.
Re: Build desktop applications using Go and Web Technologies
#55The lengths we will go to avoid writing a proper desktop application.
Re: Build desktop applications using Go and Web Technologies
#56Have a look at Fyne as well [0], which is a Go-only native UI toolkit. 0 - https://fyne.io Other discussions: - https://news.ycombinator.com/item?id=31785556 - https://news.ycombinator.com/item?id=19478079 - https://news.ycombinator.com/item?id=22291150
Re: Build desktop applications using Go and Web Technologies
#57The lengths we will go to avoid writing a proper desktop application.
Fyne is a pretty decent native solution for doing this in Go.
At least last I looked into it.
Re: Build desktop applications using Go and Web Technologies
#58Earlier quoted context omitted.
I wouldn't exactly call Flutter native. It uses its own rendering engine and doesn't necessarily behave like operating system native controls. It is not really different from using electron.
What are the Linux native controls? GTK and KDE controls are native to GTK and KDE.
Re: Build desktop applications using Go and Web Technologies
#59Earlier quoted context omitted.
Making good GUI software requires a lot of iteration and trial and error before you're satisfied with the UI and UX. With a web-based tech, you make a change, auto reload triggers, you see the change almost instantly, making tweaking very easy. If you're working with a large Qt codebase, every little change to a header file requires a long ass compile times. It's really frustrating when you spend an hour just tweakin…
It takes half a day to implement proper hot reload in QtQuick, which also has all the reactive features. Even less now that AI can just write it for you, and it’ll be more performant than Vite dev builds. Coming to desktop app development from the web, I’ve got most of the same conveniences I’m used to like GammaRay as the inspector. The only real difference is I’m willing to wade through cmake and linking errors. Ev…
Re: Build desktop applications using Go and Web Technologies
#60We built a background daemon as a macOS menu bar app in Go, and the performance was surprisingly bad. The Go bindings for native UI frameworks ended up being massive RAM hogs. When we profiled it, we found that the GC essentially gave up under load, which explained why customers were reporting a simple menu bar app consuming 2.5GB+ of RAM on their Macs. We eventually abandoned the Go approach and switched to Electron…
That is a surprising use case about Go and Electron (!), I would have imagined no contest for the superior performance of a compiled language, even with garbage collection. But the mention of "bindings for native UI frameworks", it was probably running the compiled code in a very tight loop, stressing the runtime. In contrast, Chromium specializes in UI with years of optimization. Recently for a specific purpose I wa…