Bulk project access checks are slow
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Launchpad itself |
Critical
|
William Grant | ||
Bug Description
ProductSet.
If we follow the denormalisation pattern from Branch and Bug by creating Product.
-- Old: 280000 pages, 362ms.
EXPLAIN (ANALYZE ON, BUFFERS ON)
SELECT DISTINCT Product.id
FROM AccessPolicy,
AccessPolic
Product,
TeamPartici
WHERE
AccessPolic
AND TeamParticipati
AND AccessPolicyGra
AND AccessPolicy.
AND AccessPolicy.TYPE = Product.
-- New: 874 pages, 34ms.
EXPLAIN (ANALYZE ON, BUFFERS ON)
SELECT DISTINCT AccessPolicyGra
FROM AccessPolicyGra
WHERE
AccessPolic
AND TeamParticipati
Related branches
- Colin Watson: Approve on 2015-06-29
-
Diff: 305 lines (+71/-98)8 files modifiedlib/lp/registry/interfaces/product.py (+3/-0)
lib/lp/registry/interfaces/sharingservice.py (+0/-3)
lib/lp/registry/model/person.py (+11/-39)
lib/lp/registry/model/product.py (+53/-24)
lib/lp/registry/services/sharingservice.py (+0/-15)
lib/lp/registry/services/tests/test_sharingservice.py (+0/-12)
lib/lp/registry/tests/test_product.py (+3/-3)
lib/lp/security.py (+1/-2)
| Changed in launchpad: | |
| assignee: | nobody → William Grant (wgrant) |
| status: | Triaged → In Progress |
| Launchpad QA Bot (lpqabot) wrote : | #1 |
| tags: | added: qa-needstesting |
| Changed in launchpad: | |
| status: | In Progress → Fix Committed |
| tags: |
added: qa-ok removed: qa-needstesting |
| Changed in launchpad: | |
| status: | Fix Committed → Fix Released |

Fixed in stable r17592 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 17592>.