[xml/sgml-pkgs] Bug#277071: libxml-parser-perl in conjunction with libsoap-lite-perl "High memory usage"

Markus Werner Markus Werner <markus.werner@wobcom.de>, 277071@bugs.debian.org
Mon, 18 Oct 2004 13:18:16 +0200


Package: libxml-parser-perl 
Version:  2.30-4  

Hi,


I'm using SOAP::Lite to transfer some data over the net. 
SOAP::Lite use XML:Parser:Expat.
With XML::Parser:Expat (Version 2.30) you get a high memory usage if you 
transfer datastructures that contains  some thing like this  "1 ::some thing:
\n" . In XML::Parser:Expat (Version 2.34) the problem doesn't exists any 
more. ( For test reasons I just exchanged Expat.pm v2.30 to v2.34 and the bug 
vanished).


Maybe the Bug isn't in the libxml-parser-perl by it self. Maybe it's a bug in 
IO::Handle or some different Module. I saw v 2.34 removed IO::Handle.


I suggest to upgrade to v2.34.

with kind regards

Markus Werner


Systeminformation (Woody)
---snip
libxml-parser-perl 2.30-4         Perl module for parsing XML files
libsoap-lite-p 0.55-1                Perl5 modules for client and server 
----snap





testprogramms
############
Server usage: Just call ./soaps

Client usage: ./soapc  "nr of lines" [high]
I suggest using 2000 lines (About 40 MB mem usage) with the option high 
argument. If you don't use high, erverything works fine.

----snip soapc
#!/usr/bin/perl


#use strict;
#use warnings;


use SOAP::Lite;

my @data;
for ( my $i = 0 ;  $i < $ARGV[0];  $i++) {
        if ( $ARGV[1] eq 'high') {
                #Mem usage: High
                push(@data,"$i ::some thing:\n");
        }
        else {
                # Mem usage: OK
                push(@data,"$i :some thing:\n");
        }
}

my $data = join('', @data);

my $rc = SOAP::Lite     ->uri("urn:MyServer")
                        ->proxy('tcp://localhost:12000')
                        ->myprint($data)
                        ->result;


-----snap

---snip soaps
!/usr/bin/perl


use strict;
use warnings;


use SOAP::Transport::TCP;



SOAP::Transport::TCP::Server    ->new(
                                        LocalAddr => 'localhost',
                                        LocalPort => 12000,
                                        Listen => 5, Reuse => 1)
                                ->dispatch_to("MyServer")
                                ->handle;

package MyServer;


sub myprint {
        my ($self,$data) = @_;

        print $data ;
}

---snap