This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2008-12-04.18:30:18
SpamBayes Score 0.0010817506
Marked as misclassified No
Message-id <1228415420.85.0.256947820591.issue4533@psf.upfronthosting.co.za>
In-reply-to
Content
C.l.p poster reported that 3.0 file.read is orders of magnitude slower
than with 2.5 (but confused issue with buffer = 0).  Jerry Hill reported

"Here's a quick comparison between 2.5 and
3.0 on a relatively small 17 meg file:

C:\>c:\Python30\python -m timeit -n 1
"open('C:\\work\\temp\\bppd_vsub.csv', 'rb').read()"
1 loops, best of 3: 36.8 sec per loop

C:\>c:\Python25\python -m timeit -n 1
"open('C:\\work\\temp\\bppd_vsub.csv', 'rb').read()"
1 loops, best of 3: 33 msec per loop

That's 3 orders of magnitude slower on python3.0!"

I verified this informally on WinXP by opening and then reading
Doc/Pythonxy.chm (about 4 megs) -- an eye blink versus 3 seconds,
repeated.  Even the open seemed slower but I did not time it.
>>> f=open('Doc/Python30.chm','rb')
>>> d=f.read()
History
Date User Action Args
2008-12-04 18:30:20terry.reedysetrecipients: + terry.reedy
2008-12-04 18:30:20terry.reedysetmessageid: <1228415420.85.0.256947820591.issue4533@psf.upfronthosting.co.za>
2008-12-04 18:30:19terry.reedylinkissue4533 messages
2008-12-04 18:30:18terry.reedycreate