Hallo,
I use pear cache (light) to save calculated values. The package uses
serialize to transform the content of a variable into a writable form.
This transformed value will be saved to disk.
This could be improved! Would it be possible to rewrite the serialize
function to make it possible to write directly to disk? If you have a
value, which needs 10MB you need also ca. 10MB to serialize and than you
can write this data to disk. So, you needs 20MB. If serialize (and of
course unserialize) would be able to write directly to disk (or read
directly from disk), you only needs 10MB.
I think, that could perform much better for every file cache than
current implementation does. I have such a scenario, in which a variable
needs 100MB. Because the calculation of this value needs much time, I
wanted to save this value to cache (with the help of (un)serialize). But
than, I need 200MB and that doesn't look nice, because it is not really
necessary.
As I understand the serialize structure, it would be no problem to
extend it to directly save to disk. But my c knowledge is not as good as
it should be. I would be very happy, if this idea could be realized.
Mathias
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php