I took a look at what happens when running lyx under the heap profiler
massif. The command used is
   valgrind --tool=massif --format=html --depth=10 ./lyx 
~/src/lyx/lyx-devel/lib/doc/Customization.lyx
and then I pressed pagedown repetedly until the scrollbar was at the
middle of the document.

You can see the result as a postscript file here:
  http://www-rocq.inria.fr/~lasgoutt/lyx/massif.10779.ps
and a html log here:
  http://www-rocq.inria.fr/~lasgoutt/lyx/massif.10779.html

The first yellow chunk is probably allocated by the X server. Then the
pink and red seem to be what is allocated by the stl (so basically the
memory for our document). The orange one does not count, since it is
an accumulation of small things that do not have their own entry.

The light blue entry is interesting, since it seems to point to the
banner. Following the stack leads to:
  http://www-rocq.inria.fr/~lasgoutt/lyx/massif.10779.html#bB24C7D08
therefore hinting at the graphics cache. Since the is no graphics in
Customization.lyx, I believe this is the banner. Angus, are supposed
to keep this in memory when the banner is not in use anymore?

The last interesting thingy is the dark blue 'stack' entry. This
memory grows when I press PageDown continuously and goes down when LyX
has managed to keep up with the number of PageDown request I have
issued. So there seems to be some recusrsivity going on when LyX
cannot execute events fast enough. Is that normal? The effect is much
worse with the user guide.


JMarc

Reply via email to