Apache Mod-Python - Created: (MODPYTHON-93) Improve util.FieldStorage efficiency

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > November 2005 > Created: (MODPYTHON-93) Improve util.FieldStorage efficiency





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Created: (MODPYTHON-93) Improve util.FieldStorage efficiency
Jim Gallacher (JIRA)

2005-11-26, 5:45 pm

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.3
Reporter: Jim Gallacher
Assigned to: Jim Gallacher
Priority: Minor


Form fields are saved as a list in a FieldStorage class instance. The class implements 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 all th
e 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 FieldStorage instance is created.

Mike Looijmans has been investigating StringField and Field as well. It is probably reasonable to include information on his work in this issue as well, so that we can consider all of these efficiency issues in toto.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com