views:

662

answers:

1

I'm Using PHP 5 and the built-in SoapClient.
This is really a question for the developers of PHP Soap support.

The SoapClient gives you 2 choices: WSDL mode, which caches the WSDL file locally, and non-WSDL which requires you to build your own requests.

Using the WSDL is obviously more convenient. But, I wonder how much processing this does each time you create a SoapClient instance. The WSDL is cached, but does it have to re-process the entire WSDL each time you create a SoapClient? If so, it seems it might be more efficient (CPU-wise) to go the non-WSDL route.

It's no problem to create the non-WSDL SoapClient in my situation. Should I?

-Dave

A: 

It takes enough time for them to build in a cache (so its painful). I guess the real question is when does that cache expire (on script exit?) and how many calls are you making (per script?).

Also it sounds like you're trying to prematurely optimize something. If its not a problem don't worry about it. You could spend up time on something that doesn't matter.

NeuroScr
Your question about when the cache expires is important, but I still don't know when it expires. Equally important is how much work gets done behind the scenes when you create a new SoapClient. If it's not a problem, then I don't have to worry about it. But my question was hopefully to get a response like "we measured this in the past, and found out X"
Dave C