unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <mdj@mit.edu>
Cc: guile-user@gnu.org, djurfeldt@nada.kth.se, guile-gtk-general@gnu.org
Subject: Re: New g-wrap supported in guile-gtk--rotty-0.1!
Date: Thu, 04 Dec 2003 09:14:18 -0500	[thread overview]
Message-ID: <xy7k75cllfp.fsf@chunk.mit.edu> (raw)
In-Reply-To: <87ad69j6ps.fsf@alice.rotty.yi.org> (Andreas Rottmann's message of "Thu, 04 Dec 2003 10:02:55 +0100")

Andreas Rottmann <a.rottmann@gmx.at> writes:

> [ CC'd guile-user, since maybe someone has an idea how to implement
>   this ]
>
> Kevin Ryde <user42@zip.com.au> writes:
>
>> Andreas Rottmann <a.rottmann@gmx.at> writes:
>>>
>>> I now get ~3.6 seconds of loading time for (gnome gtk) with the above
>>> referenced code, gcc 3.3.2 -O2 and Guile 1.7 on my Athlon 900. The
>>> loading time is mostly spent in scm_add_method(), FWIW...
>>
>> I wonder if some lazy initializing would be possible, like catch a
>> failed method dispatch and add only at that time.  (But my ignorance
>> of goops is pretty profound, so maybe it's not feasible.)
>>
> I don't really know. Maybe one could postpone the method creation
> until the first instance of that class has been instantiated...
>
>> gtk+gnome is pretty big, there might be a good chance an application
>> would use only a modest number of widgets and functions.  Those needed
>> to get the first window up could be even fewer.  (Always good to get
>> the first window up quickly, since the user is waiting, waiting ...)
>>
> Yes, I also think that we *have* to get the "time-to-initial-window"
> at least under 1 second for a hello world program...

GOOPS is, as yet, only optimized for fast execution.  Creation of
objects and *especially* method creation involves a lot of work, most
of which is done by interpreted Scheme code.

This is not an architectural problem, though, and it is certainly
possible to speed things up.

An improvement of method addition on the algorithm level that could
help this particular case would be to allow for adding multiple
methods at once.  Presently, every call to scm_add_method involves
re-computing the methods list of the GF which means that adding N
methods to a GF is O(N^2).

An improvement on the implementation level would be to do part (or
all) of the work in C.  This, however, should be done with preserved
respect for the MOP.  Anyone who wants to do this should talk to me
first.

(Unfortunately, I can't do any work on GOOPS right now.  Hopefully
I'll be able to go over a few issues with GOOPS starting next summer.)

M


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2003-12-04 14:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87smkc5b22.fsf@alice.rotty.yi.org>
     [not found] ` <874qwhsa2u.fsf@zip.com.au>
2003-12-04  9:02   ` New g-wrap supported in guile-gtk--rotty-0.1! Andreas Rottmann
2003-12-04 14:14     ` Mikael Djurfeldt [this message]
2003-12-04 17:21       ` Andreas Rottmann
2003-12-04 22:33       ` Andreas Rottmann
2003-12-06 16:18         ` Andreas Rottmann
     [not found]   ` <1074535797.1517.64.camel@localhost>
2004-01-23 11:38     ` [GOOPS] Specializing <generic> to allow lazy method addition Andreas Rottmann
2004-01-27 15:17       ` Mikael Djurfeldt
2004-01-27 23:27         ` Stephen Compall
2004-01-28  2:14           ` Mikael Djurfeldt
2004-02-01 19:41         ` Guile warts (was: [GOOPS] Specializing <generic> to allow lazy method addition) Andy Wingo
2004-02-05 19:03           ` Guile warts Mikael Djurfeldt

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=xy7k75cllfp.fsf@chunk.mit.edu \
    --to=mdj@mit.edu \
    --cc=djurfeldt@nada.kth.se \
    --cc=guile-gtk-general@gnu.org \
    --cc=guile-user@gnu.org \
    /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).