Click to See Complete Forum and Search --> : cache or optimize php5 xml objects?


javaperl
09-23-2005, 09:14 PM
Hi All,

My php5 web application needs to parse/marshall a bunch of xml files into php5 objects at the beginning of handling each request.

Since all the xml files are static across all requests and it is really time consuming for these operations, I am wondering if there is any available means to cache or optimize these objects/operations.

My impression is that it is common for large and complex web applications. Any input or help is highly appreciated.

Thanks.

-- javaperl

Weedpacket
09-24-2005, 04:26 AM
serialize/unserialize can work on objects. Another possibility is to use a database to stored the parsed data in a more accessible form.

goldbug
09-24-2005, 09:42 AM
memcached might work for your needs: http://www.danga.com/memcached/

Also look into many of the accelerators that work with PHP5, as some have shared-memory functionality.

javaperl
09-26-2005, 03:11 PM
serialize/unserialize can work on objects. Another possibility is to use a database to stored the parsed data in a more accessible form.
thanks for your kind help!

unfortunately serilization doesn't work in my case, as my xml object is a complicated one and php5 doesn't handle serilization of it well. is there any other way doing it?

javaperl
09-26-2005, 03:13 PM
memcached might work for your needs: http://www.danga.com/memcached/

Also look into many of the accelerators that work with PHP5, as some have shared-memory functionality.
thanks for the info! let me try some of memcached's php client libraries and see how it stores the object data. i suspect that they use php serilization to handle each object, but in my case, serilization doesn't work.