[MOBY-dev] surprising results with speed tests:

Martin Senger senger at ebi.ac.uk
Tue Jul 29 21:37:55 UTC 2003


> Can you elaborate a little...does that mean to take the whole block of XML
> specifying the service's inputs and encode it?
>
   Yes. All the Moby Central methods have parameters that are XML
fragments. These fragments can be treated either as simple strings (as
they are now) - which means that they are represented as "XML in XML"
(they are encoded into XML-based SOAP message).
 
> How does it save time?
> 
   I do not know if it saves time, it depends on the usual size of the
parameters. If you send them as strings, there is a known problem with the
expat module (quoting below). If you send them as base64 encoded
characters you double their size. So some tests would be needed to make a
decision.

   This is what SOAP:;Lite docs says about it:

           SOAP::Lite is based on XML::Parser which is basically
           wrapper around James Clark's expat parser. Expat's
           behavior for parsing XML encoded string can affect
           processing messages that have lot of encoded entities,
           like XML fragments, encoded as strings. Providing low-
           level details, parser will call char() callback for
           every portion of processed stream, but individually
           for every processed entity or newline. It can lead to
           lot of calls and additional memory manager expenses
           even for small messages. By contrast, XML messages
           which are encoded as base64, don't have this problem
           and difference in processing time can be significant.
           For XML encoded string that has about 20 lines and 30
           tags, number of call could be about 100 instead of one
           for the same string encoded as base64.

   Martin

-- 
Martin Senger

EMBL Outstation - Hinxton                Senger at EBI.ac.uk     
European Bioinformatics Institute        Phone: (+44) 1223 494636      
Wellcome Trust Genome Campus             (Switchboard:     494444)
Hinxton                                  Fax  : (+44) 1223 494468
Cambridge CB10 1SD
United Kingdom                           http://industry.ebi.ac.uk/~senger




More information about the MOBY-dev mailing list