listview: Add concept of inertness
authorBenjamin Otte <otte@redhat.com>
Mon, 27 Mar 2023 04:54:10 +0000 (06:54 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 27 Mar 2023 05:08:44 +0000 (07:08 +0200)
commit62e9d1e470b0819bdcb4d2a3ba05e083306fc0da
tree0036e116114d90a0e4d6fb6bdff58b4f245972a7
parent3fb10ff2d8cdffdc5e026f9b57c4d5580a36d308
listview: Add concept of inertness

An inert listview is a listview that does not use the factory. This
allows faster updates because no calls into user code need to happen.

A listview is inert when either:
 - It is not rooted.
 - It is not visible.
 - No factory is set (that one is obvious)

The listview does not need to be inert without a model, as that case is
handled by the item manager.

This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.

The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.
gtk/gtklistview.c