Closed (fixed)
Project:
me aliases
Version:
6.x-2.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
11 Jan 2011 at 19:25 UTC
Updated:
25 Jan 2011 at 09:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
vladsavitsky commentedOk. Let me explain what patch is doing.
Me module on some user related pages do a lot of calls of user_load() function.
And this calls are equal. This means that on a high loaded sites with a lot of users a lot of useless SQL-queries of the same data about user will be done. This increases server loads and some visitors couldn't access site.
To see all this calls you can install devel module and at devel settings page check this:
* Collect query info
* Display query log
Than visit some pages and check user_load() call number at the bottom of page.
So this patch resolves this problem adding caching of users data and do not call user_load() each time if user's data already stored in cache.
For example, on our server I have this results:
Page - user_load() calls before/after
* / - 8/1
* /user - 24/1
* /user/me/edit - 23/1
* /user/me/edit/profile - 23/0
* /admin/user/user/list - 7/0
* /admin/content/comment/approval - 7/0
* /users/XXX - 10/4
So this patch should increase module perfomance.
Patch is attached to this comment.
Comment #2
nohup commentedthanks, committed.
Comment #3
nohup commented