| User | Post |
|
5:55 am March 11, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
hi Kevin,
it appears that wordpress performance might be degraded when using Role Scoper 1.0.0-rc8.9108.
are you aware of Role Scoper degrading performance in any circumstances?
or are you under the impression that Role Scoper will never affect the performance of wordpress (except in the case of a bug) regardless of database size and number of registered users? i ask because i imagine Role Scoper is doing a lot of "work" processing permissions on every post/comment/etc. and that this necessarily degrades performance.
please comment generally on Role Scoper and wordpress performance so that i can better understand the relationship between the two.
thank you, david
|
|
|
3:05 pm March 11, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
If you're concerned about performance, you should definitely upgrade to the current Role Scoper version (rc9.9311). I added some considerable performance enhancements starting with rc9. In fact, your question led me to revisit the analysis today and eliminate (via cache) 40 queries from the Post/Page edit form.
Role Scoper adds the following server overhead in my most recent trials:
with persistent cache enabled (default):
- front end: 3.1 MB memory, 5-12 queries
- front end, "no front end admin" option: 2.5 MB memory, 5-12 queries
- admin (Administrator): 2.4 - 3.1 MB, 4-6 queries
- admin (non-Administr): 2.9 - 3.6 MB, 10-18 queries
without persistent cache enabled:
-
- front end: 20-25 queries
- admin (Administrator): 17-40 queries
- admin (non-Administr): 23-60 queries
Number of users should not have a dramatic effect on performance, though I have not done any stress testing. I would appreciate future feedback from you or others on that topic.
|
|
|
3:16 am March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
what's the recommended rc8.9108 to rc9.9311 upgrade proceedure?
|
|
|
7:54 am March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
also, a couple of months ago you provided me with a patch for rc8.9108:
admin_rs.php – // optional hack to prevent roles / restrictions menu for non-Administrators (may be implemented as an option in future versions) if ( empty($current_user->blog_roles['wp_administrator']) ) return; // end optional hack
filters-admin-ui_rs.php – // optional hack to prevent role assignment boxes for non-Editors (may be implemented as an option in future versions) global $current_user; if ( empty($current_user->blog_roles['rs_post_editor']) ) { remove_action('do_meta_boxes', array(&$this, 'act_tweak_metaboxes') ); return; } // end optional hack
has this hack been incorporated into the latest release (rc9.9311)?
|
|
|
8:28 am March 12, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
besonen said:
what's the recommended rc8.9108 to rc9.9311 upgrade proceedure?
Until I put Role Scoper into the WP Plugins directory (soon), these are the available upgrade procedures:
- Upload the new role-scoper_???.zip to your plugins folder; use your web control panel file manager to extract it. This is the preferred method because RS is never deactivated and the file updates happen near-instantly
- Next best: Temporarily take down your site using Maintenance Mode or some similar plugin, then upload the new role scoper files via ftp
- Least preferred: Deactivate Role Scoper; upload new files; re-activate Role Scoper. Only advisable if your restricted posts/pages are also private.
|
|
|
8:32 am March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
one more thing.
do comments in php work thus:
// = comment this line
/* and */ = comment multiple lines
if so, the second part of the above hack (contained within the filters-admin-ui_rs.php file) was bracketed with the /* and */ characters within my filters-admin-ui_rs.php file. interestingly, i didn't notice any role assignment boxes displayed when i was logged in as an Editor with this hack commented out. is that because the first part of the hack over-rides the second part? or am i not understanding how this hack works?
|
|
|
8:40 am March 12, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
besonen said:
prevent roles / restrictions menu for non-Administrators
This is now handled as a Role Scoper Option. On the Realm tab, Access Types section: deselect "editing and administering content".
prevent role assignment boxes for non-Editors
This is also handled as a Role Scoper Option. On the Advanced tab, Hidden Editing Elements section: select "Role administration requires a blog-wide Editor role"
Maybe an existing configuration of either of these options would answer your above question regarding non-appearance of role assignment boxes despite the commented-out hack code.
|
|
|
9:01 am March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
Kevin said:
besonen said:
what's the recommended rc8.9108 to rc9.9311 upgrade proceedure?
Until I put Role Scoper into the WP Plugins directory (soon), these are the available upgrade procedures:
- Upload the new role-scoper_???.zip to your plugins folder; use your web control panel file manager to extract it. This is the preferred method because RS is never deactivated and the file updates happen near-instantly
so the preferred upgrade proceedure might look like:
- upload the new plugin to a "role-scoper-new" directory
- rename the existing plugin directory "role-scoper-old"
- rename the new plugin directory "role-scoper"
doing the above *without* deactivating the existing Role Scoper plugin–which won't cause any problems??
i've never upgraded a plugin without first deactivating the old version–and Role Scoper seems pretty complex–but i suppose that doesn't matter because whenever wordpress needs the Role Scoper code it is reloaded from the Role Scoper files every time?
|
|
|
9:46 am March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
Kevin said:
Role Scoper adds the following server overhead in my most recent trials:
with persistent cache enabled (default):
- front end: 3.1 MB memory, 5-12 queries
- front end, "no front end admin" option: 2.5 MB memory, 5-12 queries
- admin (Administrator): 2.4 - 3.1 MB, 4-6 queries
- admin (non-Administr): 2.9 - 3.6 MB, 10-18 queries
so this is a caching mechanism that's "internal" to Role Scoper?
|
|
|
11:25 am March 12, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
Yes, it's a port of the WordPress 2.3 cache, which stored internal results such as categories and pages as files in the wp-content/cache folder. I have adapted it to store user-specific categories, category roles, general roles, pages, groups, etc. Restrictions are also cached there.
|
|
|
11:33 am March 12, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
besonen said:
i've never upgraded a plugin without first deactivating the old version–and Role Scoper seems pretty complex–but i suppose that doesn't matter because whenever wordpress needs the Role Scoper code it is reloaded from the Role Scoper files every time?
Role Scoper checks the current version tag against your last db-stored version tag on each execution and runs any necessary version maintenance scripts even if you haven't de/re-activated. Technically, the most proper procedure would be to take the site down for maintenance during the operation. You'll just have to decide how concerned you are about the risk of a php error due to site access midway through zip extraction. To me, that's a better risk to incur than temporarily deactivating RS, which would could temporarily expose restricted content for inappropriate viewing or editing, depending on your configuration.
|
|
|
3:24 pm March 12, 2009
| besonen
Member
| | | |
|
| posts 19 |
|
|
Kevin said:
besonen said:
prevent roles / restrictions menu for non-Administrators
This is now handled as a Role Scoper Option. On the Realm tab, Access Types section: deselect "editing and administering content".
prevent role assignment boxes for non-Editors
This is also handled as a Role Scoper Option. On the Advanced tab, Hidden Editing Elements section: select "Role administration requires a blog-wide Editor role"
Maybe an existing configuration of either of these options would answer your above question regarding non-appearance of role assignment boxes despite the commented-out hack code.
so the hack that still exists in admin_rs.php is just a vestigial code bit–completely superseded by the new options that you coded?
|
|
|
3:43 pm March 12, 2009
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
besonen said:
so the hack that still exists in admin_rs.php is just a vestigial code bit–completely superseded by the new options that you coded?
Yes, and in the new version you can see that I've replaced that code with a comment explaining this new arrangement.
|
|