caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] toplevel bogging down after a while
@ 2001-04-06  8:47 Chris Hecker
  0 siblings, 0 replies; only message in thread
From: Chris Hecker @ 2001-04-06  8:47 UTC (permalink / raw)
  To: caml-list


I tend to use this emacs macro a lot while I'm developing:

             (define-key caml-mode-map "\C-c\C-t"
               (lambda ()
                 "Eval the entire buffer with *inferior-caml*"
                 (interactive)
                 (inferior-caml-eval-region (point-min) (point-max))))

I love having a language with a toplevel, especially when I can run tk/gl apps straight out of emacs!  Groovy.

However, after about 15 or 20 runs of my 300 line labltk/lablgl app, the runtime performance of the app starts really decreasing.  If I kill the inferior-caml process, and start it up again, everything's back to normal.  

It seems like the gl-drawn mouse cursor is slowing down even more than the app, but the app definitely slows way down.

Below are some Gc.stat () calls at various times.  Is it likely that this is Gc related?  I don't know how to read the stats below and whether they're saying anything.  I don't mind restarting the inferior-caml process, but is this some problem with my app that I'm going to run into if the native code version is run for long enough?  Is there any way I can figure out what's causing this?  Is there a way to reset the toplevel without killing the process?

This is on Win98, OCaml 3.00, with a custom toplevel (built with unix, lablgl, and labltk).

Chris

fresh inferior-caml:
{Gc.minor_words=104712; Gc.promoted_words=41874; Gc.major_words=101633;
 Gc.minor_collections=5; Gc.major_collections=1; Gc.heap_words=126976;
 Gc.heap_chunks=2; Gc.live_words=101633; Gc.live_blocks=20071;
 Gc.free_words=25343; Gc.free_blocks=2; Gc.largest_free=25166;
 Gc.fragments=0; Gc.compactions=0}

after one run, things are nice and fast:
{Gc.minor_words=4963116; Gc.promoted_words=481604; Gc.major_words=681315;
 Gc.minor_collections=153; Gc.major_collections=3; Gc.heap_words=717824;
 Gc.heap_chunks=11; Gc.live_words=272130; Gc.live_blocks=77445;
 Gc.free_words=50961; Gc.free_blocks=222; Gc.largest_free=45281;
 Gc.fragments=54; Gc.compactions=0}

after ten or so runs, things are chugging at this point:
{Gc.minor_words=26965304; Gc.promoted_words=3293457; Gc.major_words=3519501;
 Gc.minor_collections=824; Gc.major_collections=8; Gc.heap_words=2241536;
 Gc.heap_chunks=35; Gc.live_words=201410; Gc.live_blocks=63981;
 Gc.free_words=222291; Gc.free_blocks=2316; Gc.largest_free=34683;
 Gc.fragments=1258; Gc.compactions=0}


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-06  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-06  8:47 [Caml-list] toplevel bogging down after a while Chris Hecker

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 NNTP newsgroup(s).