[issue3424] imghdr test order makes it slow
Benjamin Peterson [EMAIL PROTECTED] added the comment: Done in r65713. -- resolution: - accepted status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
Ilpo Nyyssönen [EMAIL PROTECTED] added the comment: jpeg exif png gif tiff and then the rest ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
Benjamin Peterson [EMAIL PROTECTED] added the comment: Ok. Would you like to propose an alternate order? -- status: pending - open ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
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 all digital cameras produce jpegs and handling such images is one big use case for this module. Changing the test order should be easy and have big effect in common use cases. -- components: Library (Lib) messages: 70142 nosy: biny severity: normal status: open title: imghdr test order makes it slow type: performance versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
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] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
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 tests. The beginnings those outputs show the return value counts. Added file: http://bugs.python.org/file10958/current ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3424] imghdr test order makes it slow
Changes by Ilpo Nyyssönen [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10959/optimized ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com