Code review comment for lp:~lifeless/launchpad/milestones

Revision history for this message
Curtis Hovey (sinzui) wrote :

I do not understand the first part of your answer. I see this in MilestoneView._bugtasks:
        ...
        for task in tasks:
            if task.getConjoinedMaster(bugs_and_tasks[task.bug]) is None:
                non_conjoined_slaves.append(task)
        # Checking bug permissions is expensive. We know from the query that
        # the user has at least launchpad.View on the bugtasks and their bugs.
        precache_permission_for_objects(
            self.request, 'launchpad.View', non_conjoined_slaves)
        precache_permission_for_objects(
            self.request, 'launchpad.View',
            [task.bug for task in non_conjoined_slaves])
        return non_conjoined_slaves

Since you modified the permission rules on bugtask, I wonder if the first precache_permission_for_objects() is not needed. I wonder if permission checking is fast enough.

We stopped adding enahncements to the milestone page when the preformance problems started, and we cannot entertain allowing users to edit the bugtasks unless we know the user has launchpad.Edit. I wonder if this permission change allows us to consider enhancements.

« Back to merge proposal