[issue11114] file.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's expected. seek() and tell() on text (unicode) files are slow by construction. You should open your file in binary mode instead, if you want to do any seeking. Maybe I should add a note in http://docs.python.org/dev/library/io.html#performance ---

[issue11114] file.tell extremely slow

2011-02-04 Thread DSM
DSM added the comment: (By "go away" I mean "stop being pathological", not "stop differing": I still see a factor of 2.) -- ___ Python tracker ___ _

[issue11114] file.tell extremely slow

2011-02-04 Thread DSM
DSM added the comment: With a similar setup (OS X 10.6) I see the same problem. It seems to go away if the file is opened in binary mode for reading. @Laurens, can you confirm? -- nosy: +dsm001 ___ Python tracker

[issue11114] file.tell extremely slow

2011-02-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I found that adding "infile._CHUNK_SIZE = 20" makes the test much faster - 'only' 5 times slower than 2.7. -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker _

[issue11114] file.tell extremely slow

2011-02-04 Thread Laurens
Laurens <3.14159265...@xs4all.nl> added the comment: Correction: the problem also exists in version 3.1. I created a benchmark program an ran it on my machine (iMac, snow leopard 10.6), with the following results: -- 2.6.6 (r266:84292, Dec 30 2010, 09:20

[issue11114] file.tell extremely slow

2011-02-04 Thread Eric Smith
Eric Smith added the comment: Do you have a benchmark program you can post? -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bu

[issue11114] file.tell extremely slow

2011-02-04 Thread Laurens
New submission from Laurens <3.14159265...@xs4all.nl>: file.tell() has become extremely slow in version 3.2, both rc1 and rc2. This problem did not exist in version 2.7.1, nor in version 3.1. It could be reproduced both on mac and windows xp. -- components: IO messages: 127874 nosy: La