Details
-
Improvement
-
Resolution: Fixed
-
Major
-
2.9, 3.4
-
MOODLE_29_STABLE, MOODLE_34_STABLE
-
MOODLE_34_STABLE
-
MDL-49398_final4 -
Description
So, for a long time accesslib has had commentary like this:
//TODO: MUC - this could be cached in shared memory to speed up first page loading, web crawlers, etc.
...and lots of complexity around loading role definition information down to only courses, based on the assumption going to modules/blocks would take a large amount more memory.
Anybody familiar with high traffic Moodle sites will also know that the login process is pretty heavy on the database, due to some of those big queries in accesslib.
It appears sites do not really use role overrides or assignments below the course level, so it cannot use much more space to preload those extra cases.
I've put together a proof of concept which removes the limit on how much role definition data to load, and caches this new "site wide" role definition in MUC, removing the most of the expensive portion of queries involved in initial session setup.
Looking for some input to determine if this approach is something worth pursuing...
Attachments
Issue Links
- caused a regression
-
MDL-62747 Accesslib role caching get confused by a role with no capabilities
-
- Closed
-
-
MDL-63361 Accesslib: Roledefs cache is constantly purged
-
- Closed
-
- has a non-specific relationship to
-
MDL-42192 Capabilities list caching
-
- Closed
-
-
MDL-54582 Unacceptably bad performance in load_course_context in accesslib.php
-
- Closed
-
-
MDL-48825 Use the Moodle roles cache
-
- Open
-
-
MDL-63771 Make more use of caches in accesslib
-
- Closed
-
- has to be done before
-
MDL-51897 Role definition caching & accesslib refactoring (backport of MDL-49398)
-
- Closed
-
- is duplicated by
-
MDL-56890 Slow query in accesslib/get_user_access_sitewide()
-
- Closed
-
- Testing discovered
-
MDL-60043 Performance improvement for sites with a lot of role overrides
-
- Closed
-
- will help resolve
-
MDL-34242 Develop Access caching (capabilities and contexts)
-
- Closed
-
-
MDL-25287 sessions contain tons of duplicate roles data
-
- Closed
-
-
MDL-29307 Further performance improvement for get_user_access_sitewide()
-
- Closed
-
-
MDL-50591 Absurdly slow capabilities query
-
- Closed
-
-
MDL-56053 accesslib.php get_user_access_sitewide refactoring
-
- Closed
-