public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
To: guile-gtk@sources.redhat.com
Cc: guile-devel@gnu.org
Subject: GOOPS slowness [was: Compiling guile-gobject experiences]
Date: Mon, 15 Sep 2003 17:59:00 -0000	[thread overview]
Message-ID: <87fziy7wzb.fsf_-_@alice.rotty.yi.org> (raw)
In-Reply-To: <87fziz5exr.fsf@alice.rotty.yi.org> (Andreas Rottmann's message of "Sun, 14 Sep 2003 21:48:48 +0200")

[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 <a.rottmann@gmx.at> 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.

  reply	other threads:[~2003-09-15 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-02 17:17 Compiling guile-gobject experiences Andreas Rottmann
2003-08-04 16:25 ` Andy Wingo
2003-08-04 16:58   ` Andreas Rottmann
2003-08-07  8:09     ` Andy Wingo
2003-08-07 11:18       ` Andreas Rottmann
2003-09-12 23:02   ` Kevin Ryde
2003-09-13 12:43     ` Marius Vollmer
2003-09-19  0:19       ` Kevin Ryde
2003-09-14 19:47     ` Andreas Rottmann
2003-09-15 17:59       ` Andreas Rottmann [this message]
2003-09-19  0:18       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fziy7wzb.fsf_-_@alice.rotty.yi.org \
    --to=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=guile-gtk@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).