Making WordPress.org

Opened 8 years ago

Closed 8 years ago

#2255 closed defect (bug) (fixed)

Improve performance of permission checks

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: Priority: high
Component: Translate Site & Plugins Keywords:
Cc:

Description

The logic added for #741 doesn't scale anymore.

The culprit is the $include_children argument for WordPressdotorg\GlotPress\Rosetta_Roles\Plugin::get_project_id_access_list() and trying to build a tree for all sub projects.

Attachments (1)

2255.patch (4.3 KB) - added by ocean90 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ocean90
8 years ago

  • Owner set to ocean90
  • Status changed from new to accepted

#2 @ocean90
8 years ago

In 4377:

Translate, Rosetta Roles: Don't use get_project_id_access_list() to check if a user can approve translations for a sub project.

Instead, check if one of the parent project IDs is the access list. This scales much better with 56k projects.

See #2255.

#3 @ocean90
8 years ago

In 4378:

Translate, Rosetta Roles: Remove the $include_children argument of get_project_id_access_list() for the Waiting tab.

This is temporarily and affects only PTEs for the 'wp-plugins' and 'wp-themes' projects.

See #2255.

#4 @ocean90
8 years ago

In 4395:

Translate, Rosetta Roles: Ensure the same types when doing a strict check with project IDs and the access list.

See #2255.

@ocean90
8 years ago

#5 @ocean90
8 years ago

2255.patch restores showing projects for validators of base level projects like wp-plugins or wp-themes.

@dd32 Since you added the initial query, how does 2255.patch look to you?

#6 @dd32
8 years ago

@ocean90 It's been a long time since I've been in that code, seems logical though, but consider that a review from someone looking in who has no idea what's going on in the block of code anymore..

If it seems to work in testing, probably good..

#7 @ocean90
8 years ago

In 4427:

Translate, Rosetta Roles: In the waiting tab, restore showing projects for validators of base level projects like wp-plugins or wp-themes.

This is a follow-up to [4378] which removed support for including thousands of project IDs in one query. The request queries now parent_project_id directly.

See #2255.

#8 @ocean90
8 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.