Re: Anyone wrote persistent variable extension?
| From: | Edin Kadribasic | Date: | Wed, 10 Apr 2002 06:01:39 +0000 |
| Subject: | Re: Anyone wrote persistent variable extension? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82438@lists.php.net to get a copy of this message | ||
> [RFC for New Module]
> Module name: psv (Persistent Server Variable)
> Feature:
> Maintain auto global $_PERSISTENT array that persists
> on single server.
> Function:
> none.
>
> Implementtion:
> Shared memory (libmm) for multi-process server.
> Multi-thread server uses global with lock/unlock.
>
> Usage:
> <?php
>
> if (!isset($_PERSISTENT['VAR'])) {
> include('register_very_large_array.inc');
> }
>
> ?>
>
> If you have any comments, especially if you have good names,
> please let me know. I probably write this module on this
> or next weekend.
I'm using sysvshm and sysvsem for this sort of things. It did provide
dramatic speed difference with a static array of some 130 KB. However
sysvshm extension does not work on win32. I don't know if shmop works on
that platform.
If you can make portable way of introducing $_PERSISTENT I'm all for it. If
not, I have very little to gain over using sysvshm extension directly.
Edin