Not a memory leak…
So, it’s all coming together quite nicely, but the problem with the speed of drawing is killing me. I’m (almost) sure that it’s not a cairo related memory leak. I .Destroy() everything I can. It must be just something with my drawing procedures that iterate back and forth through the tree. Obviously I don’t do it in the most effective way. The problem is I don’t know many ways… I definetely need some help. Anyone, please!

October 9th, 2006 at 18:47
Try using Node and NodeCollection instead of using List. They are generic tree classes that may be way better optimized for operating tree structures than List which you are using now (in project version I have). More info at http://www.codeproject.com/csharp/trees.asp
Greets
October 9th, 2006 at 19:11
PS: Also you said that drawing connections may be the problem. Have you tried turning anti-aliasing off?
S.
October 9th, 2006 at 20:27
PS2: I’ve written simple code that generates tree of topics (using List object – just like yourself) using my HDD structure as input and draws it on screen (simple way – just frames without names connected by bezier line) and it runs like hell. I’m using standard forms – no mono/cairo.
October 10th, 2006 at 02:34
Hmmm… based. It’s in fact quite similar to my Topics class.
1. The NodeCollection is also List
2. Well, there is no way I’m going to draw without anti-aliasing. I’d rather drop the project than create a crappy looking one.
3. I’ve done a similar thing. When I draw rectangles with fixed dimensions (not based on the Pango.Layout size) it’s fast enough.
PS. No co ty Swider. Bedziemy sie wyglupiac w rozmowe po angielsku na blogu zamiast mailem po ludzku?