STINNER Victor <victor.stin...@haypocalc.com> added the comment: > Victor, have you tried using peek() instead of seek()? > I mentioned this previously in msg85780.
In a file encoded in protocol 0, backward seek are needed to each call to unpickler_readline... and this function is called to read a number, a boolean, etc. (to read most, or all, data values). I choosed to disable the read buffer because it's slower with it. For protocol 1 and 2, there is only *one* seek at the end (but a lot of read: file size / 4096). So I don't think that it does really matter to use peek or seek. seek() is more natural (for me) and frequent than peek(), so I prefer to keep seek(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3873> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com