Repository navigation
Comparison Node Graph
A feature comparison following One Go App, Served Five Ways. Instead of one framework against the article's apps, one demanding feature across several stacks. Other pages: Home.
Stacks Wails v3.1.0 with Svelte Flow 2.0.2 · GoTTH with LiteGraph (@comfyorg/litegraph 0.17.2) ·
MyGo v0.9.0 native UI · NSGo (commit 2345b2f) · a Wails variant with LiteGraph as a control ·
Measured 2026-11-22, same machine as the article
Verdict: for a large node graph, the graph library mattered far more than the GUI framework. Everything that drew onto a canvas stayed smooth with 5,000 nodes in view; Svelte Flow, which makes one DOM element per node, froze for about 8 s on the desktop. With the same LiteGraph code, Wails and GoTTH performed alike.
Easiest to build: Wails with Svelte Flow: a ready-made editor with nodes as Svelte components, and the least graph code (about 190 lines).
Smoothest: GoTTH or Wails with LiteGraph, and MyGo native UI on the desktop. All stayed under about 10 ms per frame with the whole graph in view.
Watch out for: Svelte Flow's ceiling on visible nodes (worst in the desktop webview); NSGo lagging with the whole graph in view; LiteGraph needing its node and link drawing rewritten to match a custom look.
Which graph library? A canvas library (LiteGraph) for big graphs; Svelte Flow for small graphs and the quickest build. Which framework? It barely mattered with the same library: Wails and GoTTH were within about 10 to 15 ms on most steps. Pure Go instead of a JavaScript library? Possible: MyGo native UI was as smooth as LiteGraph on the desktop, but the graph is hand-drawn (about 440 lines).
The rest of this page is the evidence for the box above.
The 5,000-node graph at 100%, one node selected. All the apps draw the graph the same way; these screenshots are from GoTTH.
The app is a node graph editor in the style of a compositing tool: Read,
Transform, Grade, Blur, Keyer, Merge, Switch and Write nodes with typed image
and mask ports. A new shared Go package, core/graph, provides:
- two deterministic graphs: 40 nodes with 48 links, and 5,000 nodes with 7,485 links;
- each node's position, size and port positions, so every app lays out the graph identically, and one light and dark palette for the canvas;
- per-node details with editable parameters (float, int, bool, enum, string), validation, and 50 ms of simulated latency on every call.
Every app had to give the same experience on the desktop (macOS) and in Chrome: pan, zoom from 2% to 400% with Fit, drag nodes, select a node and load its details into a properties panel (ignoring late replies), edit and save with validation and a discard prompt, Find, and light and dark themes. Only visible nodes are drawn, and drawing may simplify when zoomed out.
| App | Graph drawn by | Rest of the UI |
|---|---|---|
| Wails + Svelte Flow | Svelte Flow: one Svelte component per node, SVG links | Svelte |
| GoTTH + LiteGraph | LiteGraph on a canvas, its drawing replaced | templ and htmx, served by Go |
| MyGo native UI | a hand-drawn Go widget on the GPU | MyGo widgets |
| NSGo | a hand-drawn view with NSGo's drawing API | NSGo native widgets |
| Wails + LiteGraph (control) | GoTTH's LiteGraph code, reused almost unchanged | the same Svelte panel as Wails + Svelte Flow |
Each app was built by an isolated agent from the same brief, copying its stack's setup from that stack's table app.
The bench uses the 5,000-node graph. Desktop is macOS, browser is Chrome. Two runs each, run alone; each cell shows the range. Select and save include the 50 ms of simulated latency. "Frame gap" is the longest delay of the UI thread while panning or zooming; under about 16 ms is one frame at 60 Hz.
Desktop
| Wails + Svelte Flow | Wails + LiteGraph | GoTTH + LiteGraph | MyGo native UI | NSGo | |
|---|---|---|---|---|---|
| Ready (ms) | 2,567 to 2,602 | 613 to 647 | 562 to 580 | 285 to 290 | 325 to 467 |
| Center a node (ms) | 1,335 to 1,358 | 57 to 65 | 62 | 54 to 73 | 51 to 154 |
| Pan, max frame gap (ms) | 23 to 30 | 5 to 9 | 7 to 9 | 5 | 10 to 15 |
| Zoom out to 5%, max frame gap (ms) | 7,873 to 8,001 | 9 to 10 | 7 to 8 | 8 to 9 | 28 to 56 |
| Zoom out to 5%, p95 frame gap (ms) | 7,873 to 8,001 | 7 to 8 | 5 to 6 | 7 to 9 | 10 to 24 |
| Select, median (ms) | 244 to 250 | 68 to 75 | 58 | 62 | 52 |
| Save (ms) | 155 | 65 to 69 | 83 | 62 | 72 to 73 |
Browser
| Wails + Svelte Flow | Wails + LiteGraph | GoTTH + LiteGraph | MyGo native UI | NSGo | |
|---|---|---|---|---|---|
| Ready (ms) | 1,408 to 1,682 | 382 to 384 | 379 to 384 | 689 to 724 | 721 to 788 |
| Zoom out to 5%, max frame gap (ms) | 1,955 to 2,333 | 2 to 3 | 4 to 5 | 93 to 110 | 1,378 to 1,403 |
| Zoom out to 5%, p95 frame gap (ms) | 22 to 33 | 2 | 1 to 2 | 66 to 69 | 19 to 25 |
| Select, median (ms) | 87 to 91 | 67 | 55 | 84 to 85 | 79 to 80 |
About 4,300 to 4,900 nodes were in view at 5% zoom, depending on the window.
Graph code (the canvas or graph component and its viewport math, as counted in each app; the rest of each app is panel, toolbar, bench and setup):
| Wails + Svelte Flow | LiteGraph (GoTTH, reused by Wails) | MyGo native UI | NSGo | |
|---|---|---|---|---|
| Lines | about 190 | about 520 | about 440 | about 480 |
Most of the graph in view at 6% zoom, thousands of nodes on screen: the case that separated the apps.
Hands-on (macOS).
- MyGo native UI and GoTTH were smooth, and every check passed.
- NSGo worked, but panning lagged with the whole graph in view.
- Wails with Svelte Flow was slow to start and lagged with the whole graph in view, and a little while zooming back in. It also showed a false discard prompt; that was a bug in the app, since fixed (see below). It was the only app that opened on the primary screen instead of the one with the mouse.
- Wails with LiteGraph was smooth throughout.
- Style did not separate them: the author saw no difference between the four. All four draw the canvas from the same layout and palette, and the toolbar and panel are a small part of the window.
Graph library. The control settles it. Swapping Svelte Flow for LiteGraph inside the same Wails app, with the same panel and bench, took the full-view freeze from about 8 s to about 10 ms, startup from about 2.6 s to about 0.6 s, and selection from about 250 ms to about 70 ms. Svelte Flow mounts a component and measures its ports for every node that comes into view; with thousands in view, that stalls the webview, most of all desktop WebKit. LiteGraph draws everything onto one canvas. The trade is effort: Svelte Flow nodes are ordinary Svelte components and its defaults covered nearly the whole spec, while LiteGraph's own node and link drawing did not match the spec, so its drawing was rewritten (about 520 lines), and its culling on Retina screens and its wheel handling needed fixes.
GUI framework. With the same LiteGraph code, Wails and GoTTH were within about 10 to 15 ms of each other on most steps, too small to notice. Moving that code into Wails needed a 3-line hook. Of the pure-Go options, MyGo native UI matched LiteGraph on the desktop and was slower in the browser (about 67 ms per frame at full view, p95). NSGo needed a profiling pass (below) and still lags at full view.
-
Tuning. The two apps that stalled each got one timeboxed performance
pass before the final runs, as an experienced developer of that stack would
do it:
- NSGo: profiling showed CoreGraphics slowing down on very large paths (one path per color). Starting a new path every 200 shapes took the worst stall from about 605 ms to about 70 ms. A natural first version stalled for half a second per frame.
- Wails + Svelte Flow: selection now updates only the affected nodes and links, and nodes are simplified when zoomed out. The freeze went from about 11 s to about 8 s. Turning culling off cut the worst stall in Chrome to about 346 ms but slowed panning, so culling was kept.
- Hand checks matter. The false discard prompt in Wails + Svelte Flow came from its slider reporting values when a new node loaded. The bench could not catch it, and it was fixed after the hands-on check.
Code: apps/graph-* · Shared core: core/graph · Results: results/graph/ · Briefs: briefs/graph-*.md


