Package: gtk

Accessor gtk:sort-list-model-incremental

Lambda List

gtk:sort-list-model-incremental (object)

Syntax

(gtk:sort-list-model-incremental object) => incremental
(setf (gtk:sort-list-model-incremental object) incremental)

Arguments

object -- a gtk:sort-list-model object
incremental -- a boolean whether incremental sorting is enabled

Details

Accessor of the incremental slot of the gtk:sort-list-model class. The gtk:sort-list-model-incremental function returns whether incremental sorting was enabled. The (setf gtk:sort-list-model-incremental) function sets the sort model to do an incremental sort.

When incremental sorting is enabled, the sort list model will not do a complete sort immediately, but will instead queue an idle handler that incrementally sorts the items towards their correct position. This of course means that items do not instantly appear in the right place. It also means that the total sorting time is a lot slower.

When your filter blocks the UI while sorting, you might consider turning this on. Depending on your model and sorters, this may become interesting around 10.000 to 100.000 items.

By default, incremental sorting is disabled. See the gtk:sort-list-model-pending function for progress information about an ongoing incremental sorting operation.
 

See also

2024-12-15