Re: Performance of GMainLoop
- From: Andreas Stricker <andreas stricker fela ch>
- To: gtk-app-devel-list gnome org
- Subject: Re: Performance of GMainLoop
- Date: Thu, 26 Jul 2007 16:40:24 +0200
Tomasz Jankowski wrote:
Second thing is GMainLoop's code. I'd like to know how it works. I read
code, but it isn't to understand it for me. Are there any articles about it
or so interesting threads in mailing list's archive? If i will find
something interesting in archive, please tel me where and around which date
should I search for it.
The main loop is basically a select() call under linux. A convenient one.
This means that each main loop iteration calls select with a bunch of
file descriptors to listen (X server socket and other sources). If one
of them has data the handler for this source is called, otherwise there
is a timeout that triggers the timeout events and other timed events.
So the performance should be equally to a simple select call reduced
a bit with overhead of the main loop context handling.
Note: I'm not a glib specialist.
Cheers, Andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]