Re: proposal about glib

2008-06-29 Thread Magnus Bergman
On Mon, 30 Jun 2008 09:50:07 +1000
Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:

> 
> [EMAIL PROTECTED] wrote:
> 
> > 1)I use glib's main event loop, but why glib's main event loop
> > don't support epoll/kqueue?
> > 
> > The poll/select func's efficiency is very poor.
> 
> 
> 
> Do you have any pointers to studies that measure the relative
> performance? The only one I can find is this one (admittedly
> a little old):
> 
> http://www.gelato.org/pdf/Illinois/gelato_IL2004_epoll_brecht.pdf
> 
> which shows select slightly ahead when there are less than 1
> file descriptors.
> 
> 

There are some benchmarks on the libevent page
(http://monkey.org/~provos/libevent/). It is true that there isn't much
of a difference (epoll slightly worse and kqueue slightly better) with
a low number of file descriptors. In this benchmark the big difference
becomes tangible at about a thousand descriptors. The reason for the
difference in the benchmarks is the distribution of the load.
select/poll is especially bad if only a few file descriptors are active.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: proposal about glib

2008-06-29 Thread Erik de Castro Lopo

[EMAIL PROTECTED] wrote:

> 1)I use glib's main event loop, but why glib's main event loop don't
> support epoll/kqueue?
> 
> The poll/select func's efficiency is very poor.



Do you have any pointers to studies that measure the relative
performance? The only one I can find is this one (admittedly
a little old):

http://www.gelato.org/pdf/Illinois/gelato_IL2004_epoll_brecht.pdf

which shows select slightly ahead when there are less than 1
file descriptors.



Cheers,
Erik
-- 
-
Erik de Castro Lopo
-
"Copyrighting allows people to benefit from their labours,
but software patents allow the companies with the largest
legal departments to benefit from everyone else's work."
-- Andrew Brown
(http://www.guardian.co.uk/online/comment/story/0,12449,1387575,00.html)
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: proposal about glib

2008-06-29 Thread Johan Dahlin

Felipe Contreras wrote:

2008/6/29 Johan Dahlin <[EMAIL PROTECTED]>:

Havoc Pennington wrote:

Hi,

2008/6/25  <[EMAIL PROTECTED]>:

1)I use glib's main event loop, but why glib's main event loop don't support
epoll/kqueue?

The GLib event loop has been designed to handle a low number of file
descriptors. Typical Gtk+ applications uses only 1 file descriptor (the X
connection).


GLib isn't used only on GTK+ applications.



No, but it was originally designed to be used by GTK+.

Johan

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: proposal about glib

2008-06-29 Thread Felipe Contreras
2008/6/29 Johan Dahlin <[EMAIL PROTECTED]>:
> Havoc Pennington wrote:
>> Hi,
>>
>> 2008/6/25  <[EMAIL PROTECTED]>:
>>> 1)I use glib's main event loop, but why glib's main event loop don't support
>>> epoll/kqueue?
>
> The GLib event loop has been designed to handle a low number of file
> descriptors. Typical Gtk+ applications uses only 1 file descriptor (the X
> connection).

GLib isn't used only on GTK+ applications.

-- 
Felipe Contreras
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: proposal about glib

2008-06-29 Thread Johan Dahlin
Havoc Pennington wrote:
> Hi,
> 
> 2008/6/25  <[EMAIL PROTECTED]>:
>> 1)I use glib's main event loop, but why glib's main event loop don't support
>> epoll/kqueue?

The GLib event loop has been designed to handle a low number of file
descriptors. Typical Gtk+ applications uses only 1 file descriptor (the X
connection).

See the bug Havoc mentioned and also:
http://bugzilla.gnome.org/show_bug.cgi?id=143061

Johan
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: proposal about glib

2008-06-29 Thread Havoc Pennington
Hi,

2008/6/25  <[EMAIL PROTECTED]>:
> 1)I use glib's main event loop, but why glib's main event loop don't support
> epoll/kqueue?
>
> The poll/select func's efficiency is very poor.
>
> The libevent(http://monkey.org/~provos/libevent/) use epoll/kqueue. Why glib
> not?

http://bugzilla.gnome.org/show_bug.cgi?id=156048

Havoc
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


proposal about glib

2008-06-29 Thread yangyang
 
hi
 
 
1)I use glib's main event loop, but why glib's main event loop don't support
epoll/kqueue?
The poll/select func's efficiency is very
poor.
The libevent(http://monkey.org/~provos/libevent/)
use epoll/kqueue. Why glib not?
 
2)I use glib's Testing, but documentation is missing.
There was no guide for how to set up your own project to use the glib testing
framework or higher level overview of setup/teardown, available asserts,
running, parameters, etc.
The cunit(http://cunit.sourceforge.net/) is
good. 
 
 
 
thanks
 
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list