qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	ehabkost@redhat.com, philmd@redhat.com,
	mark.cave-ayland@ilande.co.uk,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <dgibson@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: Slow down with: 'Make "info qom-tree" show children sorted'
Date: Tue, 7 Jul 2020 11:06:03 +0200	[thread overview]
Message-ID: <95768b3f-e5fe-6278-0b42-806ca7a7b3ef@redhat.com> (raw)
In-Reply-To: <20200707084647.GB2649462@redhat.com>

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



  reply	other threads:[~2020-07-07  9:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  8:47 [PATCH 0/2] qom: Make "info qom-tree" show children sorted Markus Armbruster
2020-05-27  8:47 ` [PATCH 1/2] qom: Constify object_get_canonical_path{, _component}()'s parameter Markus Armbruster
2020-05-27  9:02   ` Cédric Le Goater
2020-05-27  9:49   ` [PATCH 1/2] qom: Constify object_get_canonical_path{,_component}()'s parameter Philippe Mathieu-Daudé
2020-05-27  8:47 ` [PATCH 2/2] qom: Make "info qom-tree" show children sorted Markus Armbruster
2020-05-27  9:04   ` Cédric Le Goater
2020-05-27 10:31   ` Philippe Mathieu-Daudé
2020-07-07  4:45   ` Slow down with: 'Make "info qom-tree" show children sorted' Thomas Huth
2020-07-07  4:58     ` Philippe Mathieu-Daudé
2020-07-07  5:33       ` Markus Armbruster
2020-07-07  8:00         ` Paolo Bonzini
2020-07-07 12:00           ` Markus Armbruster
2020-07-07 12:04             ` Daniel P. Berrangé
2020-07-13  1:13             ` David Gibson
2020-07-13 16:13               ` Markus Armbruster
2020-07-15 23:59                 ` David Gibson
2020-07-16  5:37                   ` Markus Armbruster
2020-07-17  6:00                     ` David Gibson
2020-07-07  8:46     ` Daniel P. Berrangé
2020-07-07  9:06       ` Paolo Bonzini [this message]
2020-07-07  9:40     ` Daniel P. Berrangé
2020-07-07  9:49       ` Paolo Bonzini
2020-07-08  9:24       ` Markus Armbruster
2020-06-08 12:09 ` [PATCH 0/2] qom: Make "info qom-tree" show children sorted Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95768b3f-e5fe-6278-0b42-806ca7a7b3ef@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=dgibson@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=lvivier@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).