On Sat, 08 Jan 2005 12:03:10 -0800, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
>
> You greatly underestimate how slow unserialize is.
>
> -Rasmus
>
>
you're right, but php-devs seems going to rewrite it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
Xuefer Tinys wrote:
even apc/eAcc have to copy from shm to php-memory(alloc by emalloc),
because $array might be modified anytime
i'd guess this is almost same as serialize/unserialize
You greatly underestimate how slow unserialize is.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To un
even apc/eAcc have to copy from shm to php-memory(alloc by emalloc),
because $array might be modified anytime
i'd guess this is almost same as serialize/unserialize
i doubt if there's anyway to have 1 memcpy $array<-from/to->shm, php
will release 1 element of $array when the element is unset(refcou
I wrote a PHP extension a while ago that implements "executor" persistence
for scalar variables and constants. I never looked much into persisting
objects, arrays or resources but it would be a useful addition to the
extension if someone wants to contribute. I haven't updated the Web site
with the
On Thu, Jan 06, 2005 at 08:41:57PM -0500, Jason Barnett wrote:
> >Does "not up to date" mean the code isn't working with current releases
> >of php 4 or 5? I'd be interested in giving it a try.
>
> I believe this is the case. AFAIK the APC library doesn't support PHP5
> or at least it didn't when
On Fri, 7 Jan 2005, William Lovaton wrote:
> The phpbeans (or sockets) kind of solutions won't work as Josh Whiting
> (original author of this thread) would expect.
>
> phpbeans is a good idea to share (complex) business logic and data
> between many web servers but it will have to serialize and u
Hi everybody in this thread,
The phpbeans (or sockets) kind of solutions won't work as Josh Whiting
(original author of this thread) would expect.
phpbeans is a good idea to share (complex) business logic and data
between many web servers but it will have to serialize and unserialize
the data to
> > Call me crazy or ignorant, i'm both, but would it be possible to build
> > an extension that, in its MINIT hook as you suggest, actually runs a
> > separate PHP script that contains global definitions, then makes those
> > definitions available to later scripts? this is basically my original
>
Does "not up to date" mean the code isn't working with current releases
of php 4 or 5? I'd be interested in giving it a try.
I believe this is the case. AFAIK the APC library doesn't support PHP5
or at least it didn't when I looked at it. If you want to pitch in
support for APC you should just
> I think I understand where you're coming from. I've had a similar
> problem and the best solution I've found is eAccelerator (previously
> known as Turck MMCache). What EA does is keep the bytecodes PHP compiles
> inshared memory so next time you need that script PHP doesn't need to
> recompi
http://eaccelerator.sourceforge.net/Home
Go there, you'll find more about it. In short, Zend hired the lead
programmer of MMCache and the project eventually died off. Other people
picked it up and developed patches to update it. I believe eAccelerator
is the most advanced and stable for me in PH
> I've done some benchmaring and it is quite fast, specially compared to
> talking to the DB. Also, phpbeans provides a daemon that can give you
> the solution you are looking for, I believe.
>
> Adrian
Hey I just checked out phpbeans, it looks pretty intense, it does have a
php deamon that runs a
>>
>>>From my PHP library I use shm_put_var() and shm_get_var(). If
>> serialization is done this way then it is implicit... right?
>
> Yes, these functions serialize/unserialize behing the scenes.
>
> -Rasmus
Hi, has anyone got an example on howto use the shared memory functions ? I
currently
Hello,
on 01/06/2005 05:24 PM William Lovaton said the following:
El jue, 06-01-2005 a las 10:26 -0700, Adrian Madrid escribió:
I think I understand where you're coming from. I've had a similar
problem and the best solution I've found is eAccelerator (previously
known as Turck MMCache).
Hold on a
El jue, 06-01-2005 a las 10:52 -0800, Rasmus Lerdorf escribió:
> William Lovaton wrote:
> >From my PHP library I use shm_put_var() and shm_get_var(). If
> > serialization is done this way then it is implicit... right?
>
> Yes, these functions serialize/unserialize behing the scenes.
Rasmus, I a
I've done some benchmaring and it is quite fast, specially compared to
talking to the DB. Also, phpbeans provides a daemon that can give you
the solution you are looking for, I believe.
Adrian
Rasmus Lerdorf wrote:
Adrian Madrid wrote:
I think I understand where you're coming from. I've had a si
El jue, 06-01-2005 a las 10:26 -0700, Adrian Madrid escribió:
> I think I understand where you're coming from. I've had a similar
> problem and the best solution I've found is eAccelerator (previously
> known as Turck MMCache).
Hold on a second! I use Turck MMCache but I didn't know about the
c
What you are talking about is opcode caching. While it certainly speeds
things up, it can be done much faster. When you cache a file that
contains a large PHP array definition, all you are caching are the
instructions to create that array. On every request these instructions
need to be loade
Adrian Madrid wrote:
I think I understand where you're coming from. I've had a similar
problem and the best solution I've found is eAccelerator (previously
known as Turck MMCache). What EA does is keep the bytecodes PHP compiles
inshared memory so next time you need that script PHP doesn't need
William Lovaton wrote:
Rasmus,
El jue, 06-01-2005 a las 08:23 -0800, Rasmus Lerdorf escribió:
On Thu, 6 Jan 2005, William Lovaton wrote:
This is great. In my high performance web app I created a PHP library
that abstracted this to use several backends. For instance I have a
File backend and a SHM
I think I understand where you're coming from. I've had a similar
problem and the best solution I've found is eAccelerator (previously
known as Turck MMCache). What EA does is keep the bytecodes PHP compiles
inshared memory so next time you need that script PHP doesn't need to
recompile, EA ret
On Thu, 6 Jan 2005, Josh Whiting wrote:
> > Anything you do in the MINIT hook is basically free, so it would be
> > trivial to load the data for the array from somewhere. Like a database,
> > an xml file, etc. So you wouldn't need to hardcode a complex array
> > structure in your MINIT hook,
On Thu, 6 Jan 2005, William Lovaton wrote:
> Hi Rasmus,
>
> El lun, 03-01-2005 a las 14:13 -0500, Rasmus Lerdorf escribió:
> > If you need to do something fancier you can stick things in shared
> > memory. Many of the accelerators give you access to their shared memory
> > segments. For examp
Rasmus,
El jue, 06-01-2005 a las 08:23 -0800, Rasmus Lerdorf escribió:
> On Thu, 6 Jan 2005, William Lovaton wrote:
> > This is great. In my high performance web app I created a PHP library
> > that abstracted this to use several backends. For instance I have a
> > File backend and a SHM backend
> Anything you do in the MINIT hook is basically free, so it would be
> trivial to load the data for the array from somewhere. Like a database,
> an xml file, etc. So you wouldn't need to hardcode a complex array
> structure in your MINIT hook, just have this generic little extension
> that c
Hi Rasmus,
El lun, 03-01-2005 a las 14:13 -0500, Rasmus Lerdorf escribió:
> If you need to do something fancier you can stick things in shared
> memory. Many of the accelerators give you access to their shared memory
> segments. For example, the CVS version of pecl/apc provides apc_store()
>
Richard Lynch wrote:
Or you could pay a guy who knows C and PHP to do it in, what, a couple
hours? Depends on how confusing your arrays are, and how heterogeneous
they are, I guess.
Once you do that, all your data is in PHP/Apache when it launches, and
it's always available to your PHP script all
>> So if what your application mostly does is load in all this data and
>> respond to requests, you could write a *SINGLE* PHP application which
>> listened on port 12345 (or whatever port you like) and responded with
>> the
>> data requested. Like writing your own web-server, only it's a
>> _
Thanks for taking the time for your comprehensive repsonse!
> However, given your programming philosophy so far, and the fact that you
> are worried about 7ms and that you specifically requested some kind of
> shared memory space in PHP, you should Read This:
> http://us4.php.net/manual/en/ref.sem
Josh Whiting wrote:
Wow thanks for the helpful breakdown.
PHP's model is to be completely sandboxed such that every request is
completely separate from every other. Having a persistent interpreter
as you describe would break that rule and break the infinite horizontal
scalability model of PHP.
Wow thanks for the helpful breakdown.
> PHP's model is to be completely sandboxed such that every request is
> completely separate from every other. Having a persistent interpreter
> as you describe would break that rule and break the infinite horizontal
> scalability model of PHP.
Understood
Josh Whiting wrote:
Dear list,
My web application (an online classifieds server) requires a set of
fairly large global arrays which contain vital information that most all
the page scripts rely upon for information such as the category list,
which fields belong to each category, and so on. Addition
Josh Whiting wrote:
> My web application (an online classifieds server) requires a set of
> fairly large global arrays which contain vital information that most all
> the page scripts rely upon for information such as the category list,
> which fields belong to each category, and so on.
For this,
33 matches
Mail list logo