12-28-05 10:49 PM
[ http://issues.apache.org/jira/brows...HON-93?page=all ]
Nicolas Lehuen updated MODPYTHON-93:
------------------------------------
Fix Version: 3.3
Version: 3.2
(was: 3.3)
> Improve util.FieldStorage efficiency
> ------------------------------------
>
> Key: MODPYTHON-93
> URL: http://issues.apache.org/jira/browse/MODPYTHON-93
> Project: mod_python
> Type: Improvement
> Components: core
> Versions: 3.2
> Reporter: Jim Gallacher
> Assignee: Jim Gallacher
> Priority: Minor
> Fix For: 3.3
> Attachments: modpython325_util_py_dict.patch
>
> Form fields are saved as a list in a FieldStorage class instance. The class implem
ents a __getitem__ method to provide dict-like behaviour. This method iterates over
the complete list for every call to __getitem__. Applications that need to access a
ll
the fields when processing the form will show O(n^2) behaviour where n == the number of form
fields. This overhead could be avoided by creating a dict (to use as an index) when the Fie
ldStorage instance is created.
> Mike Looijmans has been investigating StringField and Field as well. It is probabl
y reasonable to include information on his work in this issue as well, so that we ca
n consider all of these efficiency issues in toto.
[ Post a follow-up to this message ]
|