Closed (fixed)
Project:
Role Weights
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2008 at 23:22 UTC
Updated:
19 Feb 2008 at 17:48 UTC
This function makes a query every time it is called, which is not good performance wise, especially when it is used for things like http://drupal.org/node/114037
This patch adds a simple static cache to the function, which is cleared from _role_weights_set_weight(), so we don't need to worry about setting/getting weights mid-page load.
| Comment | File | Size | Author |
|---|---|---|---|
| role_weights_get_static.patch | 1.44 KB | owen barton |
Comments
Comment #1
pfaoclePatch applies fine, working OK. Anyone got any thoughts on performance, or is this a no-brainer?
Comment #2
pfaocleCommitted to 5.x-1.x-dev. Thanks again.
Comment #3
pfaocleCommitted to HEAD and released 5.x-1.2 with this in. Closing issue.
Comment #4
pfaocle