Re: store class zithin session
| From: | Eric Butera | Date: | Thu, 20 Nov 2008 19:35:19 +0000 |
| Subject: | Re: store class zithin session | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283604@lists.php.net to get a copy of this message | ||
On Thu, Nov 20, 2008 at 2:07 PM, Jochem Maas <jochem@iamjochem.com> wrote:
> Eric Butera schreef:
>> On Thu, Nov 20, 2008 at 8:37 AM, Yeti <yeti@myhich.com> wrote:
>
> ...
>
>>>
>>
>> Autoload. Why on earth would you do such a thing?
>
> autoload ... your neighbourhood opcode cache performance killer,
> then again so is file based sessions (for ease of use I stick
> my session files on /dev/shm/foo [i.e. RAM] if/when using a
> file based session handler ... I figure if the box goes down and
> takes /dev/shm with it the lost session data is the least of
> my worries ... besides by the time the box is up current visitors
> will generally have given up and left already)
>
> ... and storing a path to
> a file containing a serialized object in the session is a bit nuts,
> you might as well store the serialized object in the session and
> save at least one file write/read. storing a serialized object,
> as opposed to letting the session handler do transparent serialization
> can help you get round an infrastructure problem (where you can't
> load the class before starting the session) and also can improve
> performance where you might not want/need to initialize the
> given object on every request.
>
>>
>
>
Well I wouldn't put objects into the session to begin with. I was
just talking about this specific case. Wouldn't autoload be fine if
the file was already in the opcode cache?