Rules integration from this module, when a WSDL document contains a lot of operations and data types, can cause a massive memory overhead. In my current testing with two fairly hefty WSDL docs being loaded, I profiled the memory being allocated by wsclient.rules.inc alone at 141Mb. This can happen on any request following a cache clear, so the only available recourse is to increase PHP memory limit globally, which is undesirable, especially if rules integration is not being used as in my current project which uses this module principally to make building arguments to SOAP services easier.

Even on projects where Rules integration is being used, very often only a subset of operations and data types are actually used in rules.

My suggestion for a solution, just a tentative proposal at the moment, is to add a pair of hooks which would allow other modules to selectively filter out action and rule items. Alternatively and perhaps better would be if the interface of the service class were to be extended to provide rules-specific methods for returning arrays of actions and data types.

I attach a patch showing a possible implementation of the former approach.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alfaguru’s picture

New version of patch to fix typo.

maximpodorov’s picture

Is dependency on Rules necessary for this module at all?