voelin-gpui: the tree marks who talks again, the ring on the avatar and the bars on the row

The gate ruled for parity: the tree cleared `talking` on every row to keep its
pane from being drawn with each start and stop of someone's voice, and the
Slint tree (channels.slint) has the speaking ring on the avatar and the bars
on the row. The model keeps the flag now and client_row draws the ring
(Avatar::speaking) and the bars, 14 pixels as SpeakingBars is, after the badges
and before the LIVE mark, as the Slint row orders them.

The cost was measured with the meter at 10 starts and stops a second (the
sample server, release build, lavapipe on Xvfb :231): the tree pane is
rendered once for each, 9.97 a second for 9.97 events, as the members panel is,
and the rail, the top bar and the main area not at all; 102 % of a core in
all, 5.0 % of it GPUI's thread, which is what the run before the change had
(3.1 % to 5.0 %). docs/ui.md replaces the paragraph that said the tree carries
no talking with the figure; the tests that counted the tree as not drawn count
it as drawn once (a talker changes one row and draws the tree once; the tree
and the members panel and no other pane), and the sample server's tree marks
Kairo.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-28 07:42:20 +03:00
1 parent 6b01e25391
commit 122b2d29fa
6 files changed
+100 -52

No files matched your search

+39 -18
View File
@@ -1053,8 +1053,8 @@ crates/voelin-gpui/
not told), the channel tree and the members panel on the sample server's
events (the rows, folds kept in the settings and found by the next run, a
double-click that joins, the password prompt, a move and a mute as their
exact row operations, a talker that redraws the members panel and no other
pane, the member card, an avatar written again), a connect through a real
exact row operations, a talker that redraws the tree and the members panel
and no other pane, the member card, an avatar written again), a connect through a real
engine that has no connector (it answers that none serves the address, which
reaches the status line), the store on a
directory of its own, the theme (it reaches gpui-component, follows the window's
@@ -1508,12 +1508,18 @@ the tests:
scroll stays where it was) and to the rows it has, and keeps the rows the
event carries, not the model's at the moment it hears of them; a change that
moves none of the rows of a pane emits nothing to it.
- **The tree carries no `talking`.** Its rows are built with the flag cleared,
so someone who starts or stops talking changes the members panel (and the
sidebar's own card when it is us) and not the tree: its pane is not rendered
(the `a_talker_does_not_draw_the_tree_again` test counts it). The Slint tree
draws speaking bars on the row, which would redraw the tree with every start
and stop of someone's voice; this front end leaves them to the members panel.
- **The tree marks who talks, and is drawn once for each start and stop.** Its
rows keep `talking`, so the avatar has the green ring and the row the three
speaking bars, as `channels.slint` draws them (the bars stand still: nothing
here draws the window with the clock). Someone who starts or stops talking
changes one row of the tree and one of the members panel, and each of those
two panes is rendered once for it, with the sidebar, which every frame
renders; no other pane is (the `a_talker_changes_one_row_and_draws_the_tree_once`
and `a_talker_redraws_the_tree_and_the_members_panel_and_no_other_pane` tests
count it). The first version of the slice cleared the flag to keep the tree out
of it; the gate ruled for parity with the Slint tree, and the cost was
measured: 9.97 renders of the tree a second for 9.97 starts and stops a second
([what a change costs](#what-a-change-costs)).
#### What a change costs
@@ -1535,20 +1541,18 @@ window's frames, and each pane's passes):
A window nobody touches is not drawn, with the tree and the panel on screen as
before (the shell alone was 192.7 MiB; the pictures and the two panes' state
are the difference, not itemized). Someone who talks is one engine event and so
one frame: the members panel is the only pane that is rendered for it, and the
sidebar, which every frame renders (its cards are small and have no size of
their own to cache at); the rail, the top bar, the main area and the tree are
not rendered at all in the 570 events of the run. GPUI's own thread spends 5 %
one frame: the members panel was the only pane that was rendered for it (the
tree carried no `talking` then; the figures of the talking marks are below),
and the sidebar, which every frame renders (its cards are small and have no size
of their own to cache at); the rail, the top bar, the main area and the tree
were not rendered at all in the 570 events of the run. GPUI's own thread spends 5 %
of a core on the 9.7 frames a second (the first run, of the `aa640cf` tree on a
quieter machine, 3.4 % at 10.0 frames, with `llvmpipe` at 100.9 % and 105.4 % in
all; the loaded machine starved the process of a frame in ten).
The rest is the software device: `llvmpipe` draws the whole 1440 by 960 window
again for every frame, about 90 ms of CPU a frame on this machine, which a GPU
does; so the figure that says what a talker costs the app is the thread's, and
the one that says what a window nobody touches costs is the idle row. (The
Slint tree draws speaking bars on its rows; with them the tree pane would be
rendered for each of those frames too, which is why this one does not: not
measured.)
the one that says what a window nobody touches costs is the idle row.
**Again after the review's fixes** (the banner veil, one letter on small avatars
and the password prompt change what a row draws, not when a pane is rendered):
@@ -1559,6 +1563,23 @@ person talking 10 times a second: 106.4 % (111 %) in all, `llvmpipe` 102.3 %,
GPUI's thread 3.1 %, 225.9 MiB, 10.0 frames a second, rendered per second 0, 0,
10.0, 0, 0, 10.0 (the sidebar and the members panel only, as above).
**Again with the talking marks on the tree** (the speaking ring and bars on the
tree's rows, which the gate's ruling restored; they make the tree pane change
with every start and stop): the talking run on the release build of the commit
that restored them, lavapipe (Mesa 26.2.5, `llvmpipe (LLVM 21.1.8, 256 bits)`
through Vulkan) on Xvfb `:231` of 3840 by 2160 with openbox, 1440 by 960, the
state under the checkout's `.scratch/`, the machine at a load average of 83 at
the start and 41 at the end, 60 samples after the first 15 of 75. A sample person
talking 10 times a second (`VOELIN_DEMO_TALK=10`): 102.2 % (112 %) in all,
`llvmpipe` 95.6 %, GPUI's thread 5.0 % (8 % at most), 224.0 MiB, 9.97 engine
events and 9.97 window frames a second, rendered per second 0, 0, 9.97, 9.97, 0,
9.97 (rail, top bar, sidebar, tree, main, members): the tree pane is rendered
once for each start and stop, as the members panel is, and the rail, the top bar
and the main area not at all. The tree's pane costs no measurable CPU on top: the
thread's 5.0 % is the figure of the first run (5.0 %) and above the second's
(3.1 %), a spread the load of the machine makes, and `llvmpipe` draws the whole
window for a frame whichever pane asked for it.
**Seen against a server** (the TeamSpeak 3 development server of
`dev/docker-compose.yml`, 3.13.8, release build of the tree committed as
`aa640cf` (built just before that commit, whose own changes to the tests came
@@ -1634,7 +1655,7 @@ seventh standing in for the chat. The callbacks are GPUI actions
| Slint property (used by) | Here |
|---|---|
| `tree` (`channels.slint`) | `TreeModel::rows`, the `talking` flag cleared |
| `tree` (`channels.slint`) | `TreeModel::rows` |
| `server_members` (`members.slint`) | `TreeModel::people` |
| `member_total` (`members.slint`) | `TreeModel::total` ("Members — N") |
| `member_card` (`members.slint`) | `TreeModel::card` (`voelin_ui_vm::tree::member_card`), shown by `MemberCardView` |
@@ -1650,7 +1671,7 @@ seventh standing in for the chat. The callbacks are GPUI actions
dialog) are the other server callbacks of the Bridge that these panes will meet
later; neither file uses them.
What differs from the Slint tree and panel, beside the tree's talkers above:
What differs from the Slint tree and panel:
the speaking bars stand still (nothing here may draw the window with the clock);
the lists scroll with the wheel and have no scrollbar; a click on a channel
selects it where Slint opens its chat; the card has no buttons; the members