[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Debug printouts - faster to screen or file?
> In my experience a file is gobs faster than the screen.
> Each character is possibly captured via popen, clipped, translated,
> antialiased, masked, blitted... This ain't no 'load [screen], char'
> world
> any more -
> but for files, an 'A' is still a 1-byte write to a memory-buffered file.
> One big difference is if your screen output ever requires scrolling -
> that also soaks up a lot of CPU.
> But I guess testing you
I do write to files if I want performance when debugging. But I normally
revert to print statements for stuff I commit. File output is faster (on
the whole) for the reasons mentioned above, and because python seems to
cache writes: it doesn't do a byte at a time, but waits for a few cycles
until there is a couple of K or so to output. Often my file is written
to for a while after I close the application...
Mileage may vary however...
G
--
"I sense much NT in you! NT leads to Blue Screen. Blue Screen leads to
downtime, downtime leads to suffering... NT is the path to the
darkside!"
-- Author: Unknown Unix Jedi
--
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org