Catalin Iacob <iacobcata...@gmail.com> added the comment: I updated Goplat's patch to the default branch.
It now needs to read 4 dummy bytes instead of 6 since an extra PyMarshal_ReadShortFromFile was added to the default branch in the mean time. I added an explicit dummy buffer instead of reading the dummy bytes into name (for cleanness and because name would overflow on hypothetical platforms where MAXPATHLEN + 5 < 8). Also added tests for the loop that skips the rest of the header by creating some zips with file comments; without the extra test, commenting out the loop didn't fail test_zipimport. Running Goplat's test in msg106191 on Windows I get 0.032 sec before and 0.015 sec after. On Linux I see no significant difference. AFAIK Mercurial (for example) ships with a zipped stdlib on Windows and they care quite a lot about startup time. Can this make it into 3.3? ---------- nosy: +catalin.iacob versions: +Python 3.3 -Python 3.2 Added file: http://bugs.python.org/file25823/zipimport_speedup-v2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8745> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com