Re: memory pressure with many widgets
Richard Jones <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 25, 2008 at 02:00:42PM +0000, David Powers wrote: > Sample programs with LablGtk appear to slow down severely somewhere around > 1000 widgets on screen (packed in a scrolling pane). Some preliminary work > with gprof and reading the source point to a global root (sometimes > several?) allocated with each GObject that may be the issue. That said, > gprof isn't the sharpest tool, and there may be other factors. Do people > have any good general suggestions for handling large numbers of widgets > using lablgtk? Anything I should be specifically avoiding? I've had this problem before, but it happened because there were two many global roots -- 30,000 in my case because I was using a data field in a GtkTreeView(?) widget. It was an OCaml problem, nothing to do with lablgtk. IIRC the fix was to change the data field into a string and use a hashtable to map the string to the actual object I was trying to store. Rich. -- Richard Jones Red Hat