NYCPHP Meetup

NYPHP.org

[nycphp-talk] session size important?

Hans Zaunere lists at zaunere.com
Thu Apr 21 13:46:09 EDT 2005


> If this question is redundant, feel free to direct me to a discussion
> or article.  But maybe it's worth asking once in a while anyway,
> since PHP is continually updated and performance can change.
> 
> The question is:  how much data should I feel free to store in a
> session?  As much as I want?  Or not?
> 
> Since they're serialized text files...and have to be parsed, I'm just
> wondering if people have experienced slowdowns or other erratic
> behavior by saving too much data in the session variable.

If you mean sending data back and forth using cookies, keep it small, like well under a 1K is what I personally like to do.  You can then of course use a session ID to link into a database, where obviously the size is unlimited.

H





More information about the talk mailing list