[development] sessions problem
Sheryl (Permutations Software)
sheryl at permutations.com
Wed Dec 24 15:16:15 UTC 2008
Jamie Holly wrote:
> I took a quick look at the module and found this in phpfreechat_room:
if (is_numeric($user->uid)) {
$_SESSION['drupal_user'] = $user;
}
> This creates a lot of overhead. The user object can become really large
> depending upon what different modules are doing things with it. I looked
> through the code and the only part of the user object I see being used
> is $user->uid in phpfreechat_prepare_params(). I don't even see any real
> reason to store the uid, since you have the global $user that is going
> to be available for that session. I would say a good starting point is
> dumping that all together, since you have a global $user that gets
> loaded when the session is loaded.
Jamie - I just want to say that you TOTALLY ROCK!!!! This was the problem. I
commented out this code, nothing broke, and the sessions table data returned
to normal size (so far so good, anyway).
I'm embarrassed didn't look in the module myself. I thought I knew the code
well from working on it, and I knew I wasn't saving anything to $_SESSION. I
forgot there were some pieces I hadn't touched or even looked at in a long
time.
Many thanks!!!!
- Sheryl
More information about the development
mailing list