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

RE: [soaplite] Slow response from SOAP::Lite with 400K xml and XM L::LibXML

Expand Messages
  • Sheth, Niraj
    return $root- toString(1, 1); fixed utf8 problem. Anyway is there any other performance improvement for sending xml string? Thanks, -Niraj ... From: Sheth,
    Message 1 of 1 , Oct 31, 2002
    • 0 Attachment
      return $root->toString(1, 1);

      fixed utf8 problem.

      Anyway is there any other performance improvement for sending xml string?

      Thanks,
      -Niraj

      -----Original Message-----
      From: Sheth, Niraj [mailto:niraj_sheth@...]
      Sent: Thursday, October 31, 2002 8:43 PM
      To: 'soaplite@yahoogroups.com'
      Subject: [soaplite] Slow response from SOAP::Lite with 400K xml and
      XML::LibXML


      Hi,

      My set up is...(all latest version)
      SOAP::Lite
      XML::LibXML
      XML::Parser
      mod_perl
      per 5.6.1
      solaris 2.8

      I am having very weird problem(I am sure I am doing something wrong but just
      don't know what).
      I have xml file(>400K) and trying to send it with following package.
      getXML takes only 2-3 seconds for client to get response (both client and
      server on local solaris 2.8 box)
      while getLibXML takes forever .. (>5 minutes), or sometimes it times out.

      If I bring down file size to 80K both works fine, though getLibXML takes
      10-12 seconds more (NOTE: XML::LibXML takes less then 0.2 seconds)

      Any Idea?


      ---------------------><----------------
      package TryMe;

      use strict;
      use XML::LibXML;
      use Data::Dumper;

      my $file = "/my/path/to/some.xml";

      sub getLibXML {
      my $parser = XML::LibXML->new();
      my $tree = $parser->parse_file($file);
      my $root = $tree->getDocumentElement;
      # This takes forever!
      return $root->toString();
      }

      sub getXML {
      my $fileContent;
      { local $/ = undef;
      open FH, $file;
      $fileContent = <FH>;
      close FH;
      }
      # Takes less then a second or so.
      return $fileContent;
      }

      1;

      ---------------------><----------------


      pstack <http-pid>

      ----------------- lwp# 1 / thread# 1 --------------------
      0015295c Perl_utf8_to_uv (20, 1, ffbef348, 0, 20, 11e0f86) + 630
      0010f770 Perl_sv_pos_b2u (10c1c4a, ffbef3cc, e, 1123008, 0, 6e9fec) + 88
      00128b50 Perl_pp_substcont (6e6240, 6e6240, 1, 0, 0, 0) + 438
      000ff554 Perl_runops_standard (198800, 8000, 0, ff05e000, 198fd4, 198fc4) +
      10
      000b1afc ???????? (ffbef5a8, 0, 198400, 198c00, 198800, 0)
      000b1808 perl_call_sv (0, 43c00c, 198800, 157300, 0, 2d) + 4d4
      0002dca8 perl_call_handler (a8628c, a94040, 0, 1572b8, 0, ff00) + 5b0
      0002d4a0 perl_run_stacked_handlers (1569f0, a94040, a862e0, 1, 1571e0,
      a950b8)
      + 1d0
      0002bb40 perl_handler (a94040, 2b998, ffffffff, 0, 74, 74) + 1a8
      00076e8c ap_invoke_handler (a94040, 0, 3d8356, 52, 45, ff010168) + 198
      00095a04 ???????? (a94040, 1, 19e040, 52, effffc00, 1)
      00095a88 ap_process_request (a94040, c8, a94040, ffbef928, ffbef938, 2) +
      3c
      00088924 ???????? (2, 868dc, 86800, ff06b1e0, ff065910, ff05efc0)
      00088cb0 ???????? (19e040, 2, 3dc1d2e5, 52, 10, ff01b404)
      00088dd4 ???????? (8, 0, 5, 18bc00, 2f6e6574, 6c6f6773)
      00089808 ???????? (1, ffbefbec, 0, 0, ff1bd00c, 1679c8)
      0008a464 main (1, ffbefbec, ffbefbf4, 1983ac, 0, 0) + 530
      0002a5e8 _start (0, 0, 0, 0, 0, 0) + 5c
      ----------------- lwp# 2 / thread# 2 --------------------
      ff19b9a4 signotifywait ()
      ff03ed90 _dynamiclwps (ff05e000, 10, 2, 197000, ffbef844, 4) + 1c
      ff04206c thr_yield (0, 0, 0, 0, 0, 0) + 8c
      ----------------- lwp# 3 / thread# 3 --------------------
      ff19c054 lwp_sema_wait (fdf0de30)
      ff039af4 _park (fdf0de30, ff05e000, 0, fdf0dd70, 24d54, 0) + 114
      ff0397bc _swtch (fdf0dd70, fdf0dd70, ff05e000, 5, 1000, 1) + 424
      ff03ddf8 _reap_wait (ff0629e8, 204e4, 0, ff05e000, 0, 0) + 38
      ff03db50 _reaper (ff05ee38, ff005d10, ff0629e8, ff05ee10, 0, fe400000) +
      38
      ff04b730 _thread_start (0, 0, 0, 0, 0, 0) + 40



      So, looks like it's taking a good time with Perl_utf8_to_uv with getLibXML
      call, but I just don't understand why?

      Thanks,
      -Niraj


      LEGAL NOTICE
      Unless expressly stated otherwise, this message is confidential and may be
      privileged. It is intended for the addressee(s) only. Access to this E-mail
      by anyone else is unauthorized. If you are not an addressee, any disclosure
      or copying of the contents of this E-mail or any action taken (or not taken)
      in reliance on it is unauthorized and may be unlawful. If you are not an
      addressee, please inform the sender immediately.


      To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.