Loading ...
Sorry, an error occurred while loading the content.

Too many function calls

Expand Messages
  • Shade_Jon
    Hi, all. I am sending a request to a WSDL service using SOAP::Lite. The request is about 20 sets of 30 lines of serialized data, constructed about 5 layers
    Message 1 of 1 , Jul 9 12:23 AM
    • 0 Attachment
      Hi, all.

      I am sending a request to a WSDL service using SOAP::Lite. The
      request is about 20 sets of 30 lines of serialized data, constructed
      about 5 layers deep in arrays and hashes.

      DProf tells me I'm making more than 100,000 (!) function calls to
      construct this data, including 20,000 calls to Universal::ISA, 18,000
      to SOAP::Data::new, etc...

      Trying to send the data as SOAP::Data->type('xml' => qq(<blah>...))
      cuts the number down by about 1/3, but still way to much.

      Any idea on how to cut this down? The progam is a) too slow, and b)
      running at 20M of memory.

      Yehuda

      P.S. The code looks something like:

      @records = (SOAP::Data->name(
      "Record" => \SOAP::Data->value(
      SOAP::Data->name("bName" => "Name 1")->type("base64"),
      SOAP::Data->name("bAddress" => "")->type("base64"),
      SOAP::Data->name("bEmail" => "")->type("base64"),
      SOAP::Data->name("bTel" => "")->type("base64"),
      ...
      about 30 of these lines, total

      about 20 of these requests

      And:

      my $res = $som->Method(
      SOAP::Data->name("Requests" => [
      SOAP::Data->name(
      "Request" => \SOAP::Data->value(
      SOAP::Data->name("Id" => 4)->type("base64"),
      SOAP::Data->name("Type" => 1)->type("int"),
      SOAP::Data->name("Size" => 20)->type("int"),
      SOAP::Data->name( "Records" => \@records )
      )
      )
      ]
      )
      );

      P.P.S. By the way, it works.
    Your message has been successfully submitted and would be delivered to recipients shortly.