Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

smartyValidate: session objects?

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
tangfucius
Smarty Rookie


Joined: 30 Sep 2004
Posts: 16

PostPosted: Thu Nov 04, 2004 9:44 pm    Post subject: smartyValidate: session objects? Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7367
Location: Lincoln Nebraska, USA

PostPosted: Thu Nov 04, 2004 9:53 pm    Post subject: Re: smartyValidate: session objects? Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP