og_user_roles_user_manage() does not scale

fgm - September 28, 2009 - 12:56
Project:OG User Roles
Version:6.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Currently, og_user_roles_user_manage() works by doing a db_query('SELECT uid FROM {users}') and user_load-ing every entry.

For medium and large sites, this means a totally unrealistic load both on the DB (one full scan table + n queries) and on the PHP (user_load-ing all user accounts).

The purpose of this code is to obtain a list of the accounts in groups managed by the current user, and only them, filtering achieved by an array_intersect() after building that monster list.

This should be done in a cheaper manner, and seems possible with just one query over the {og_uid} table.

#1

sun - December 5, 2009 - 17:55
Status:active» won't fix

With the rise of the rewritten OGUR 4.x for Drupal 6, in which many unrelated features of OGUR were removed, and nearing a release of Drupal 7, I'm closing down old issues.

 
 

Drupal is a registered trademark of Dries Buytaert.