user_stats_get_stats() is used to retrieve user data for use in say forum displays. From what I can gather and from my own use of it, I can use this function in my theme to extract out various user-related data. This function calls user_load on every invocation and as user_load is not cached normally, I made some modifications you can see in the attached patch to call user_load only once per page load per user.
| Comment | File | Size | Author |
|---|---|---|---|
| user_stats.module.patch | 570 bytes | jaydub |
Comments
Comment #1
liam mcdermott commentedI rolled your patch in with a bunch of other changes made last night. I know that's probably bad practice, but hey-ho. :)
Am going to have to test this thoroughly on a forum topic with 300 replies on the same page. Am worried that amount of caching will cause PHP to run out of memory.
Will leave this bug open until testing is complete. Although, the changes are in the packaged version on the project page, so feel free to grab it and test.
Comment #2
liam mcdermott commentedComment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.