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
Comment #1
catchNot sure if the RDF issue is still valid. http://drupal.org/project/entitycache handles users now though.
Comment #2
scor commentedFYI, this issue was solved with #683590: user_load still being called for every node view.
Comment #3
Anonymous (not verified) commentedOk, closing this out then.