ZF-3280: Zend_Server_XmlRpc_Cache - does not improve performance
[From firstname.lastname@example.org] -- David Goodwin email@example.com wrote (on Thursday, 15 May 2008, 10:43 PM +0100):
I've written a (relatively) small Zend_XmlRpc_Server service and I'm
pleased with the architecture of the code itself; however, I now need to
see if I can boost performance.
The documentation  covers how the server definition can be cached
using Zend_XmlRpc_Server_Cache; unfortunately when I implemented this,
calling 1000 method calls goes from taking 1 minute 40s to 2m 40
seconds. Hardly a performance improvement!
Has anyone else here used the Zend_XmlRpc_Server_Cache functionality,
and/or have any numbers to report back re "before and after"
Unfortunately, the server cache does not do what I intended it to when I originally coded it. The problem with performance is due to the fact that it must both re-instantiate objects as well as perform reflection on all of them -- but in reverse order (reflection objects are what are cached).
I would like to address this in the future; would you be willing to put an issue in the tracker, so it doesn't get lost, but also so that I can ping you about testing?
In the meantime, you have a couple of options:
- First, don't use the server cache
- Make sure you are using an opcode cache
- Consider setting up functionality to cache read-only methods, so that the XML-RPC server can be bypassed entirely for such calls.