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!
screenshot_180_cut1.png

4 Responses to “Not a memory leak…”

  1. Swider Says:

    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

  2. Swider Says:

    PS: Also you said that drawing connections may be the problem. Have you tried turning anti-aliasing off?

    S.

  3. Swider Says:

    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.

  4. piotr Says:

    Hmmm…
    1. The NodeCollection is also List based. It’s in fact quite similar to my Topics class.
    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?

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes