Re: [PHP] Persistent data between two executions

[email protected] (James Colannino)
Newsgroups php.general
Message-ID <[email protected]>
Martin Scotta wrote:
> You can use $_SESSION to store the object, and serialize to convert to
> string and reverse

I like that idea.  I think I may end up going that route.

I have one question.  This is VERY hypothetical, and mostly just to
satisfy a curiosity, but let's assume that you write an application that
supports a few hundred users, each of which happen to be logged on at
the same time.

Assuming that serialization/unserialization happens frequently in the
application, how severely will that impact performance?  I'd imagine
quite a bit, since you're reading/writing a lot from disk, which is
inherently slow.

I suppose one interesting way to alleviate this problem on a per-machine
basis would be to implement /tmp in a RAM disk, so that session data is
effectively written to and read from memory instead of to and from the disk.

I suppose the best solution would be to design things such that as
little data as possible is serialized between page refreshes.

James
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.