[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

m


-----Original Message-----
From: owner-pygame-users@seul.org [mailto:owner-pygame-users@seul.org]On
Behalf Of Paul Sidorsky
Sent: Tuesday, February 05, 2002 10:32 AM
To: pygame-users@seul.org
Subject: Re: [pygame] Debug printouts - faster to screen or file?


Pete Shinners wrote:

> i assume sending this to a file would be faster, since it wouldn't
> require any graphics output to the screen. lots of printing statements
> do have an impact on performance. i'm how much is gained by sending it
> to a file instead.

I think the screen will be faster.  The screen is still memory even
though it's a few layers out from the CPU.  The slowest memory is still
a few hundred times faster than the fastest hard drive.  Caching will
mitigate this somewhat but if you've got a lot of prints eventually
they'll have to be physically written to disk and then your program will
stop dead for a second.

Hmmm, maybe setup a RAMdrive?  Best of both worlds...

--
======================================================================
Paul Sidorsky                                          Calgary, Canada
paulsid@shaw.ca                        http://members.shaw.ca/paulsid/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org