Return-Path: Delivered-To: apmail-httpd-python-dev-archive@www.apache.org Received: (qmail 61648 invoked from network); 11 Sep 2006 11:05:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 11:05:43 -0000 Received: (qmail 52866 invoked by uid 500); 11 Sep 2006 11:05:42 -0000 Delivered-To: apmail-httpd-python-dev-archive@httpd.apache.org Received: (qmail 52846 invoked by uid 500); 11 Sep 2006 11:05:42 -0000 Mailing-List: contact python-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list python-dev@httpd.apache.org Received: (qmail 52835 invoked by uid 99); 11 Sep 2006 11:05:42 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 04:05:42 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=nlv11281@natlab.research.philips.com; spf=permerror X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS Received-SPF: error (idunn.apache.osuosl.org: domain natlab.research.philips.com from 161.85.125.10 cause and error) Received: from ([161.85.125.10:59538] helo=gw-eur4.philips.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id C6/90-24862-D0345054 for ; Mon, 11 Sep 2006 04:05:51 -0700 Received: from smtpscan-eur5.philips.com (smtpscan-eur5.mail.philips.com [130.144.57.168]) by gw-eur4.philips.com (Postfix) with ESMTP id 4D37549733 for ; Mon, 11 Sep 2006 11:05:28 +0000 (UTC) Received: from smtpscan-eur5.philips.com (localhost [127.0.0.1]) by localhost.philips.com (Postfix) with ESMTP id 8F67B3271 for ; Mon, 11 Sep 2006 11:05:27 +0000 (GMT) Received: from smtprelay-eur1.philips.com (smtprelay-eur1.philips.com [130.144.57.170]) by smtpscan-eur5.philips.com (Postfix) with ESMTP id 492942D75 for ; Mon, 11 Sep 2006 11:05:27 +0000 (GMT) Received: from beorn.natlab.research.philips.com (beorn.natlab.research.philips.com [130.145.139.38]) by smtprelay-eur1.philips.com (Postfix) with ESMTP id 1D43B22DE for ; Mon, 11 Sep 2006 11:05:27 +0000 (GMT) Received: from bard (bard [130.145.131.125]) by beorn.natlab.research.philips.com (8.12.11.20060308/8.12.11) with ESMTP id k8BB5QEX031479 for ; Mon, 11 Sep 2006 13:05:27 +0200 Received: from NLVEHVRES2DTD73.ddns.htc.nl.philips.com ([130.145.204.25]) by bard (MailMonitor for SMTP v1.2.2 ) ; Mon, 11 Sep 2006 13:05:26 +0200 (CEST) Message-ID: <450542F6.3050509@natlab.research.philips.com> Date: Mon, 11 Sep 2006 13:05:26 +0200 From: Mike Looijmans User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: python-dev@httpd.apache.org Subject: Re: [jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency References: <7417160.1157969842752.JavaMail.jira@brutus> In-Reply-To: <7417160.1157969842752.JavaMail.jira@brutus> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N As I recall, dropping the current Trac version for 3.3 is what we wanted to do. In addition, there was talk about implementing a __setitem__ method as well to support manual insertion of fields, so that FieldStorage becomes a real dictionary-like object. The add_field method was to be reworked so that it could be publicly available. (side thought: Allowing population from code rather than only from a Request object might allow FieldStorage to be used in test code) -- Mike Looijmans Philips Natlab / Topic Automation Graham Dumpleton (JIRA) wrote: > [ http://issues.apache.org/jira/browse/MODPYTHON-93?page=comments#action_12433818 ] > > Graham Dumpleton commented on MODPYTHON-93: > ------------------------------------------- > > Have we decided that we will not try and be compatible with Trac and expect people using mod_python 3.3 to use the next unreleased version of Trac? This next version of Trac works via a WSGI gateway and thus doesn't use FieldStorage and thus doesn't have the problems seen here. Can we mark the original issue as resolved for 3.3? > > >>Improve util.FieldStorage efficiency >>------------------------------------ >> >> Key: MODPYTHON-93 >> URL: http://issues.apache.org/jira/browse/MODPYTHON-93 >> Project: mod_python >> Issue Type: Improvement >> Components: core >> Affects Versions: 3.2.7 >> Reporter: Jim Gallacher >> Assigned To: 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 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 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 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. > >