On 07/07/20 10:46, Daniel P. Berrangé wrote: > On Tue, Jul 07, 2020 at 06:45:57AM +0200, Thomas Huth wrote: >> Sure, we can work around that problem in the CI (Alex has already a >> patch queued), but still, is there something you could do about this >> massive slowdown? > > I think the answer is to stop using q_queue_insert_sorted(). The impl of > it looks like it is quadratic in complexity. Instead store the objects > in a plain array and then use qsort() at the end.
g_list_sort uses a mergesort, so it's a good choice as well. But yeah GPtrArray is another possibility. Paolo