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 catalin.iacob
Recipients Goplat, brett.cannon, catalin.iacob, ysj.ray
Date 2012-06-04.21:55:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338846936.98.0.829441125171.issue8745@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2012-06-04 21:55:37catalin.iacobsetrecipients: + catalin.iacob, brett.cannon, ysj.ray, Goplat
2012-06-04 21:55:36catalin.iacobsetmessageid: <1338846936.98.0.829441125171.issue8745@psf.upfronthosting.co.za>
2012-06-04 21:55:35catalin.iacoblinkissue8745 messages
2012-06-04 21:55:34catalin.iacobcreate