Opening this as a spin-off issue from #597236: Add entity caching to core. We shouldn't tackle it in the main issue since users have their own very specific problems.

Since RDF currently does a full user_load() for every comment or node viewed, and there is also #490108: user_load() should add session properties when loading the currently logged-in user suggesting loading global $user fully on every request, in the region of an 8% performance penalty (possibly more when loading more than one user per page between global $user a node and a comment), we should look at caching users in core.

Problems with this:

$user->access - however this is updated something like every three minutes now, we could consider a cache clear when it's updated, might still be worth it, or loading just the ->access property from the database while having everything else cached.

Last I looked, some things which can change user properties bypassed $user->save, but that might not be accurate.

Comments

catch’s picture

Version: 7.x-dev » 8.x-dev

Not sure if the RDF issue is still valid. http://drupal.org/project/entitycache handles users now though.

scor’s picture

Since RDF currently does a full user_load() for every comment or node viewed

FYI, this issue was solved with #683590: user_load still being called for every node view.

Anonymous’s picture

Status: Active » Fixed

Ok, closing this out then.

Status: Fixed » Closed (fixed)
Issue tags: -Performance

Automatically closed -- issue fixed for 2 weeks with no activity.