|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
tangfucius Smarty Rookie
Joined: 30 Sep 2004 Posts: 16
|
Posted: Thu Nov 04, 2004 9:44 pm Post subject: smartyValidate: session objects? |
|
|
smartyValidate is a great tool, but why use session objects?
From my programming experience, or so from other experts articles,
one should try to stay away from storing large objects in sessions, because one large object, say if it's 10kbytes, if you store in the session and don't destroy it anytime soon, that means 10kbytes of memory/system resource is occupied for EACH client, and when you have
thousands of clients online, that would cause major performance problem.
or is it that really just my ignorance? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Nov 04, 2004 9:53 pm Post subject: Re: smartyValidate: session objects? |
|
|
tangfucius wrote: | smartyValidate is a great tool, but why use session objects?
From my programming experience, or so from other experts articles,
one should try to stay away from storing large objects in sessions, because one large object, say if it's 10kbytes, if you store in the session and don't destroy it anytime soon, that means 10kbytes of memory/system resource is occupied for EACH client, and when you have
thousands of clients online, that would cause major performance problem.
or is it that really just my ignorance? |
A session is needed to persist across form submissions on the server side. I suppose there are other ways, but this was the easiest and most convient and that is what they are for! What do you mean by "large" session? There is one array (no objects) used for holding the form validation criteria in the session file.
Form posting is typically a fraction of the bandwidth on high-traffic websites anyways, but even so it shouldn't be the source of a resource problem... its primarily disk space, not memory or cpu consumption. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|