Download & Extend

optimize queries in theme_role_name()

Project:Role help
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

theme_role_name is called once for each role in several forms, and each time a query is run to get the summary.

Either:
- load all summaries in to a static
- preload them in the caller and pass them in one at a time along with the role details

The second is probably better as that follows the pattern of giving a theme function what it needs to work with. Though in this case the caller is another theme function!

Setting as minor as this only affects admin edit pages, so not a performance issue really.