GtkColumnView: bad fast scrolling performance
Fedora 33, Wayland, GNOME, GTK4 3.99.4 from org.gnome.Sdk//master
.
I have a GtkColumnView
with a few label columns and ~1500 rows.
Fast scrolling brings it down to below 20 FPS whereas a Qt5 app with 4-5 times as many columns scrolls much smoother.
(apologies for a phone recording; something broke obs-xdg-portal a few days ago and gnome-shell screencast is also broken)
The .ui file for the column view: table.ui
The closures bound to list items directly fetch properties, they all look something along this:
[GtkCallback]
private string? format_vert_speed (Row? row) {
if (row == null)
return null;
var frame = row.command_frame;
if (frame == null)
return null;
var state = frame.pre_player_move;
if (state == null)
return null;
var vel = state.velocity;
if (vel[2] == 0)
return null;
return "%.1f".printf (vel[2]);
}
I did a perf record
of fast scrolling and got a flame graph. Open in browser to be able to zoom in on sub-trees.