Re: Persistent data between two executions

From: Date: Wed, 17 Jun 2009 05:56:19 +0000
Subject: Re: Persistent data between two executions
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-294144@lists.php.net to get a copy of this message
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

« previous php.general (#294144) next »