[Ipe-discuss] Possible memory leak

Otfried Cheong otfried at ipe.airpost.net
Thu Dec 31 07:24:02 CET 2009


T T wrote:
> While editing a path with hundreds of points, I've noticed that Ipe
> consumes a lot of memory (~GB), so much that it brought my system to
> its knees and I had to kill it. I wasn't able to pinpoint the source
> of the problem, though. I use Win XP in case that matters.
> 
> Also, in the path editing mode I sometimes get an error that autosave failed.

It would be good if you could file these as bug reports.

Currently, Ipe places no limit on how much undo information is stored. 
When editing a big document for a long time, an enormous amount of data 
could be accumulated.  I guess we need a configurable limit, say 16 undo 
steps.  The same is true for path-editing, although I didn't expect this 
to be a problem.

You can verify how much memory is consumed by Lua structures in 
Help->About Ipe (check the "Lua" line).   This does not show the memory 
used by the Ipe objects not allocated inside Lua, but it should give a 
good indication of how the growth of the undo stack.

Lua has garbage collection, so should not be leaking memory.  If I made 
a mistake, it is possible that Ipe objects bound by Lua are not released 
when the Lua object is garbage-collected - I should run some tests to 
check this (but won't have time for this in the coming weeks).

Happy New Year!
  Otfried





More information about the Ipe-discuss mailing list