I use the console.out.writeline() to print the coordinates belonging to the different sprites in a XNA game. But after a few seconds, the game starts to go really slow, and almost stop.
(When not writing to the console, there are no problems with performance).
(The sprite's positions are written in every update method)
Is there a way to write to the console without destroying the performance to the game?
Are you able to write to a log file instead of the console? That may well be faster due to buffering and the lack of scrolling, displaying etc.
Do you actually have a console up while this is running? If so, try minimising it when you're not interested. My guess is it's the scrolling which is causing the problem.
EDIT: Okay, it seems some evidence is in order.
A few tests... I don't have XNA installed, but different ways of writing to consoles are still interesting. I wrote the numbers 0-99999 to various consoles:
So as you can see, the Visual Studio console is painfully slow, a non-minimised "normal" console is next slowest, a minimised console is reasonably nippy, and writing to a file is very quick.
I stand by my advice to try writing to a file instead of the console, and otherwise if it's a standalone console, try to minimise it for most of the time.