public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Ariel Rios <ariel@arcavia.com>
To: guile-gtk@sourceware.cygnus.com, federico@helixcode.com
Cc: guile@gnu.org
Subject: Big memory problem with the canvas and gnome-guile
Date: Mon, 11 Dec 2000 11:50:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10012111311550.1194-100000@soleil.gnome.org> (raw)

Recently for a school project I wrote a simple L-System generator
that comes with a logo-like implementation that enables to do
a graphical interpretation of the strings generated by the L-System
Look on:
http://www.cogs.susx.ac.uk/users/gabro/lsys/lsys.html
for more info on L-Systems

We need to take an L-System like:
 w: F+F+F+F 
  p: F -> F+F-F-FF+F+F-F
 and then according to the number of substitutions we do we get a final
string. Each F is interpreted as draw a line and the + - signs indicate
a change on the angle.

for drawing each line I do:
(gnome-canvas-item-new  (root-component obj) 'GnomeCanvasLine 
          :points (vector xo yo xf yf))

The problem is that when I do select an iteration number >= 5,
the pogram is damn slow and starts using memory in a huge way.

My thought is that creating a big number of canvas items is taking
that bunch of memory. HOwever I don't know if its a guile, guile-gtk
or GNOME canvas memory problem. Can you help to track me down this
problem?

Obviously I can change the hack and instead of drawing a line per each
F found on the string I can create a global vector to create at the end
only one canvas item. Still I would like to track the memory problem.

You can find the code at:
http://www.netpedia.net/hosting/erin/download/lsys.tar.gz

It includes the code and a small document about L=Sys.
To run it you need to do:
guile-gtk -l lsys-main.scm

You need to have a working gnome-guile, guile 1.4
and goops 0.9.0.

Thanks!

ariel 


                 reply	other threads:[~2000-12-11 11:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.10.10012111311550.1194-100000@soleil.gnome.org \
    --to=ariel@arcavia.com \
    --cc=federico@helixcode.com \
    --cc=guile-gtk@sourceware.cygnus.com \
    --cc=guile@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).