[New-bugs-announce] [issue3424] imghdr test order makes it slow

Ilpo Nyyssönen report at bugs.python.org
Tue Jul 22 11:30:39 CEST 2008


New submission from Ilpo Nyyssönen <iny at iki.fi>:

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 <report at bugs.python.org>
<http://bugs.python.org/issue3424>
_______________________________________


More information about the New-bugs-announce mailing list