[issue16569] Preventing errors of simultaneous access in zipfile

David Wilson report at bugs.python.org
Tue Nov 11 04:16:44 CET 2014


David Wilson added the comment:

Compared to the cost of everything else ZipExtFile must do (e.g. 4kb string concatenation in a loop, zlib), its surprising that lseek() would measurable at all. 

The attached file 'patch' is the minimal change I tested. It represents, in terms of computation and system call overhead, all required to implement the "seek before read" solution to simultaneous access. On OSX, churning over ever member of every ZIP in my downloads directory (about 400mb worth), this change results in around 0.9% overhead compared to the original module.

Subsequently I'm strongly against the patch here. It is in effect papering over an implementation deficiency of the current zipfile module, one that could easily and cheaply be addressed.

(My comment on this ticket is in the context of the now-marked-duplicate issue22842).

----------
nosy: +dw
Added file: http://bugs.python.org/file37172/patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16569>
_______________________________________


More information about the Python-bugs-list mailing list