I am creating a custom console in GDI+ and C# and I am drawing each character in the buffer individually (loops rows and columns). Now the default screen size for my console contains 1600 characters (80x20) and it ignores (doesn't draw) null characters, but after I type about 150 characters it starts to freeze and drawing slows down. I'm drawing by overriding the OnPaint method and using a timer to call this.Invalidate() and this.Update() but even if I disable the timer and put it after the code that inserts characters it still has a slow drawing speed.
My drawing code is this
for (int l = topLine; l <= (this.Height / charSize.Height) + topLine; l++)
for (int c = 0; c < bufferSize.Width; c++)
g.DrawString(buffer[l][c].Char, this.Font, Brushes.White, buffer[l][c].Position);
that code isn't exactly what I have but I just simplified it.