On Sunday 24 February 2002 02:43 am, Christoph Lange wrote:
> > The session hash is serialized/deserialized in its entirety using the
> > Storable module.
>
> Does this mean, that - after tying the session hash - it is of no
> importance (concerning the amount of time needed) whether I do
> %everything_from_session_hash = %session_hash; # or
> $everything_from_session_hash{element1} = $session_hash{element1};
> I actually thought that the second way saves time since only one value of
> the hash (however big this may be) is extracted from the database.
There is no difference. Behind the scenes, the entire hash is serialized into
a single scalar and stored in a single database field. In order to retrieve
any part of the session, the scalar must be read from the database and
de-serialized. The serialize/de-serialize steps are performed when you
tie/un-tie the hash.
I found it helpful to take apart the various Apache::Session modules and see
what makes them tick.
--
Milo Hyson
CyberLife Labs, LLC