manage_FTPstat and manage_FTPlist considered harmful

Bug #143556 reported by Sidnei da Silva
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Medium
Unassigned

Bug Description

Several issues here:

- Looks like the CWD command ends up calling manage_FTPlist, but never actually looks at the result except for the status code and deciding if it's a directory or not is checked by looking at the first entry only. manage_FTPlist looks at 'self.objectItems()' which can be very expensive when looking at folders with lots of items. This can be optimized.

- MTDM and SIZE call manage_FTPstat, which in ObjectManager has the following pearl of programming:

        # check to see if we are acquiring our objectValues or not
        if not (len(REQUEST.PARENTS) > 1 and
                self.objectValues() == REQUEST.PARENTS[1].objectValues()):

Obviously there must be a better way to check if objectValues is being acquired than waking up all the objects in the folder and it's parent.

Tags: bug zope
Revision history for this message
Hanno Schlichting (hannosch) wrote :

This beautiful code is still present.

Changed in zope2:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.