Hide Forgot
QMF now has an event based mechanism for getting notified that there are incoming messages to process. Using this instead of a polling approach will improve performance. For reference, here is a similar change made to pacemaker-cloud: https://github.com/pacemaker-cloud/pacemaker-cloud/commit/ef9a99b6a0954db75d3bbac5c31e2ceaa5575979 Also note that this is Linux specific. The previous approach will still be needed for Windows (unless there is a separate EventNotifier implementation for Windows).
I took a look at this and it's not quite as easy as I hoped. It actually doesn't help anything as long as we're using the glib main loop. You can have the main loop poll an fd for you, but it's still waking up the process just as often to do so as it was before. You can't just have it block on poll(). I think the best thing to do here would be to consider switching to libqb.
(In reply to comment #1) > I took a look at this and it's not quite as easy as I hoped. It actually > doesn't help anything as long as we're using the glib main loop. You can have > the main loop poll an fd for you, but it's still waking up the process just as > often to do so as it was before. You can't just have it block on poll(). I'm likely missing some context here, but that just sounds wrong. The GLib mainloop *definitely* supports passing -1 as a timeout to poll(). If you suspect there's a bug or deficiency, feel free to file a bug at http://bugzilla.gnome.org, component glib.