Re: Re: proposal about glib
But, now, many applications use glib, such as: light httpd(http://blog.lighttpd.net/articles/2008/02/19/project-glib-it-compiles-mostly). These applications needs more efficiency. -原始邮件-发件人:Johan Dahlin <[EMAIL PROTECTED]>收件人:Felipe Contreras <[EMAIL PROTECTED]>主题:Re: proposal about glib发送时间:30 Jun 2008, 07:25:03 AMFelipe 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
GLib unit testing docs (Re: proposal about glib)
On Wed, 25 Jun 2008, [EMAIL PROTECTED] wrote: hi 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. Quick Guide: http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/ Mini HOWTO: http://mail.gnome.org/archives/gtk-devel-list/2007-December/msg00181.html Reference documentation: http://library.gnome.org/devel/glib/stable/glib-Testing.html The initial proposal provides a high level overview of the main driving design aspects: http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg0.html For more general introductions to unit testing, the email recommends: [1] "xUnit Test Patterns: Refactoring Test Code" by Gerard Meszaros. book:http://www.amazon.com/dp/0131495054 wbesite: http://xunitpatterns.com/ (the website is really good as it described many patterns introduced in the book) [2] "Simple Smalltalk Testing: With Patterns" by Kent Beck. link: http://www.xprogramming.com/testfram.htm [3] "JUnit Test Infected: Programmers Love Writing Tests" by Eric Gamma and Kent Beck link: http://junit.sourceforge.net/doc/testinfected/testing.htm (Excellent introduction to automated unit testing) thanks --- ciaoTJ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: proposal about glib
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
[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
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/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
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
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