[issue3424] imghdr test order makes it slow

2008-08-16 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Done in r65713. -- resolution: -> accepted status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3424] imghdr test order makes it slow

2008-08-02 Thread Ilpo Nyyssönen
Ilpo Nyyssönen <[EMAIL PROTECTED]> added the comment: jpeg exif png gif tiff and then the rest ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Py

[issue3424] imghdr test order makes it slow

2008-07-31 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Ok. Would you like to propose an alternate order? -- status: pending -> open ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
Changes by Ilpo Nyyssönen <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10959/optimized ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
Ilpo Nyyssönen <[EMAIL PROTECTED]> added the comment: Naturally it requires a big amount of files. Getting big amount of jpegs is easy. Getting big amount of pbms or rgbs is not so easy. I'll attach two profiling runs showing some difference when test_jpeg and test_exif are moved to be the first

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Do you have any benchmarks to prove this with? IMO, the difference would be extremely insignificant. -- nosy: +benjamin.peterson status: open -> pending ___ Python tracker <[EMAIL PROTECTED]>

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
New submission from Ilpo Nyyssönen <[EMAIL PROTECTED]>: The order of tests in imghdr makes it slow in common cases. Even without any statistics it is quite easy to see that jpeg is the most common format. In imghdr only bmp and png are after it. Also, should png really be the last one? Nearly al