From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26001 invoked by alias); 15 Sep 2003 17:59:06 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 25994 invoked from network); 15 Sep 2003 17:59:05 -0000 Received: from unknown (HELO octopussy.utanet.at) (213.90.36.45) by sources.redhat.com with SMTP; 15 Sep 2003 17:59:05 -0000 Received: from patricia.utanet.at ([213.90.36.8]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19yxcu-0001kA-00; Mon, 15 Sep 2003 19:59:04 +0200 Received: from dsl-154-112.utaonline.at ([62.218.154.112] helo=garibaldi) by patricia.utanet.at with esmtp (TLSv1:RC4-SHA:128) (Exim 4.12) id 19yxcs-0000RT-00; Mon, 15 Sep 2003 19:59:02 +0200 Received: from alice.rhinosaur.lan ([192.168.1.3] helo=alice ident=mail) by garibaldi with esmtp (Exim 4.22) id 19yxeK-0002fB-Ta; Mon, 15 Sep 2003 20:00:32 +0200 Received: from andy by alice with local (Exim 4.22) id 19yxeS-0002na-I3; Mon, 15 Sep 2003 20:00:40 +0200 To: guile-gtk@sources.redhat.com Cc: guile-devel@gnu.org Subject: GOOPS slowness [was: Compiling guile-gobject experiences] References: <87ptjornbn.fsf@alice.rotty.yi.org> <20030804162116.GA1217@lark> <871xulk3v7.fsf@zip.com.au> <87fziz5exr.fsf@alice.rotty.yi.org> From: Andreas Rottmann Date: Mon, 15 Sep 2003 17:59:00 -0000 In-Reply-To: <87fziz5exr.fsf@alice.rotty.yi.org> (Andreas Rottmann's message of "Sun, 14 Sep 2003 21:48:48 +0200") Message-ID: <87fziy7wzb.fsf_-_@alice.rotty.yi.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-q3/txt/msg00081.txt.bz2 [Cc'ed to guile-devel since this is a guile/GOOPS speed issue; Context: The new guile-gobject Guile bindings for GTK+ use GOOPS to provide an OO interface. Building this interface (at binding module load time) is painfully slow (leading to a 10 seconds total for loading the whole GTK+ binding on my machine (Athlon 900)). ] Andreas Rottmann writes: > A way to speed the binding creation up a little bit might be to move > the ability to create methods into g-wrap, since that would save us a > few scm_c_lookups for each method. I'll look into this once I'm done > with testing the above mentioned modifications. > I've now done that and have all code for method creation in one place. I did some simple benchmarking via clock() and identified the major culprits: method creation : 4.35 seconds total (1350 * 0.00322222) GF create: 3.01 seconds total (782 * 0.0038491) method add: 1.25 seconds total (1048 * 0.00119275) The values in the parenthesis are the count how often the code segment is executed and the time in seconds for each iteration. "GF create" is the following code: default_val = scm_make (scm_list_3 (scm_class_generic, name_keyword, generic_name)); "method add" is this: scm_add_method (gf, meth); Now I wonder why it takes so long to construct a generic function (the method add time is not *that* bad)... Regards, Andy -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 Packages should build-depend on what they should build-depend.