Scribble bugs

B

benben

I built the C# example of Scribble and played around with it for a while. I
have found these following problems with the program:

1. It starts horribly slowly. I understand MSIL code must be JIT-compiled
before they can be run but Scribble is such a simple program and it should
not take nearly a minute to start up on my Pentium IV 2.4 Hz machine running
windows xp.

2. The strokes are bulky--there are white "holes" in the strokes especially
when it is drawn really slowly. At first I thought it was a sort of texture
applied for fun, but with some experiments taken it surely isn't the case.

3. The re-paint process is rather slow! This time the same group of painting
methods are activated repeatedly and theoretically it should not take too
long since the JIT compilation is carried out only at the first activation
of a method. If you try to scribble up the entire painting area and drag a
dialog box (the about box) across you'll find repainting around the dialog
box and the box becomes difficult to move.

4. The re-paint is not complete! I scribbled up the whole painting area with
a thick pen and the painting area becomes simply plain black. Now after some
dialog box dragging and menu popping, it happens some white holes (rather
big) comes up which indicates that the area is not completely repainted.

I also tried to build same Scribble written in C++ and the MFC library
(non-dotnet stuff). The repaint process is still slow but visibly faster
than the C# example; problem 1, 3 and 4 does not appear.

As a critical conclusion, C# programs are slow at least in drawings, and the
GDI+ .Net interface seems buggy.

ben
 
J

Joris Dobbelsteen

benben said:
I built the C# example of Scribble and played around with it for a while. I
have found these following problems with the program:

1. It starts horribly slowly. I understand MSIL code must be JIT-compiled
before they can be run but Scribble is such a simple program and it should
not take nearly a minute to start up on my Pentium IV 2.4 Hz machine running
windows xp.

Sorry, don't know. Try a splash screen, this will improve visual performance
significantly.
2. The strokes are bulky--there are white "holes" in the strokes especially
when it is drawn really slowly. At first I thought it was a sort of texture
applied for fun, but with some experiments taken it surely isn't the case.

Re-paint problem just like 3, I assume?
3. The re-paint process is rather slow! This time the same group of painting
methods are activated repeatedly and theoretically it should not take too
long since the JIT compilation is carried out only at the first activation
of a method. If you try to scribble up the entire painting area and drag a
dialog box (the about box) across you'll find repainting around the dialog
box and the box becomes difficult to move.

Try
.SuspendLayout
and
.ResumeLayout

I would be glad to hear your about your experience on this.
4. The re-paint is not complete! I scribbled up the whole painting area with
a thick pen and the painting area becomes simply plain black. Now after some
dialog box dragging and menu popping, it happens some white holes (rather
big) comes up which indicates that the area is not completely repainted.

Can't help on this one, sorry. Perhaps its again caused by the redraw or by
the order of the redraw?

- Joris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top