Could apc_fetch return a pointer to data in shared memory ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or: Why doesn't PHP have Applications variables like ASP.NET  (and node.js)
?

Hi,

I'm working on optimising a php application (Drupal).

The best optimisation I've found so far is to use APC to store various bits
of Drupal data in RAM.

The problem with this is that with Drupal requiring say 50Mb of data* per
request is that lots of cpu cycles are wasted de-serialising data out of
apc_fetch. Also 50Mb of data per http process !! is wasted by each one
re-creating it's own copy of the shared data.

If it were possible for apc_fetch (or similar function) to return a pointer
to the data rather than a copy of the data this would enable incredible
reduction in cpu and memory usage.

This is essentially how ASP.NET Application variables and node.js work.

I'm surprised PHP doesn't already have Application variables, given that
they are so similar to Session Variables and that it's been around for a
long time in ASP / ASP.NET.

I just wondered if there was a reason for not having this functionality or
if it's on a road map somewhere or I've missed something :) ?

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux