manage_FTPstat and manage_FTPlist considered harmful

Bug #143556 reported by Sidnei da Silva on 2005-10-29
Affects Status Importance Assigned to Milestone
Zope 2

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.

Hanno Schlichting (hannosch) wrote :

This beautiful code is still present.

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

Other bug subscribers