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

forcing base64 in XMLRPC::Lite

Expand Messages
  • mrdamnfrenchy@yahoo.com
    Is there a way to force a string to be encoded in base64 using XMLRPC::Lite? With very large string, the XML Parser seems to take forever. Thanks -Mathieu
    Message 1 of 7 , Aug 6, 2001
    View Source
    • 0 Attachment
      Is there a way to force a string to be encoded in base64 using XMLRPC::Lite?

      With very large string, the XML Parser seems to take forever.

      Thanks

      -Mathieu
    • David Mullens
      try $data = SOAP::Data- type(base64 = $data); where $data is the string you want encoded. Peace, Dave. ... From: soaplite@yahoogroups.com
      Message 2 of 7 , Aug 6, 2001
      View Source
      • 0 Attachment
        try $data = SOAP::Data->type(base64 => $data);

        where $data is the string you want encoded.

        Peace,

        Dave.

        -----Original Message-----
        From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com]
        Sent: Monday, August 06, 2001 10:07 AM
        To: soaplite@yahoogroups.com
        Subject: [soaplite] forcing base64 in XMLRPC::Lite
        Importance: Low


        Is there a way to force a string to be encoded in base64 using
        XMLRPC::Lite?

        With very large string, the XML Parser seems to take forever.

        Thanks

        -Mathieu



        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/
      • Paul Kulchenko
        Hi, David! ... Correct. For XMLRPC, XMLRPC::Data synonim can be used. If you want to use module on server side that works with both XMLRPC and SOAP protocols,
        Message 3 of 7 , Aug 6, 2001
        View Source
        • 0 Attachment
          Hi, David!

          > try $data = SOAP::Data->type(base64 => $data);
          Correct. For XMLRPC, XMLRPC::Data synonim can be used. If you want to
          use module on server side that works with both XMLRPC and SOAP
          protocols, than you can safely use SOAP::Data and it'll work in
          SOAP::Lite and XMLRPC::Lite.

          Best wishes, Paul.

          --- David Mullens <damullens@...> wrote:
          > try $data = SOAP::Data->type(base64 => $data);
          >
          > where $data is the string you want encoded.
          >
          > Peace,
          >
          > Dave.
          >
          > -----Original Message-----
          > From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com]
          > Sent: Monday, August 06, 2001 10:07 AM
          > To: soaplite@yahoogroups.com
          > Subject: [soaplite] forcing base64 in XMLRPC::Lite
          > Importance: Low
          >
          >
          > Is there a way to force a string to be encoded in base64 using
          > XMLRPC::Lite?
          >
          > With very large string, the XML Parser seems to take forever.
          >
          > Thanks
          >
          > -Mathieu
          >
          >
          >
          > 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/
          >
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          >
          > 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/
          >
          >


          __________________________________________________
          Do You Yahoo!?
          Make international calls for as low as $.04/minute with Yahoo! Messenger
          http://phonecard.yahoo.com/
        • mrdamnfrenchy@yahoo.com
          That helps, but the performance is still sucky. Alhough most of it is due to the XML parser. Maybe I ll just rewrite the serializer for XMLRPC::Lite to a
          Message 4 of 7 , Aug 6, 2001
          View Source
          • 0 Attachment
            That helps, but the performance is still sucky. Alhough most of it is due to the XML parser. Maybe I'll just rewrite the serializer for XMLRPC::Lite to a format that's easier to parse. Non-portable, but what the heck, I need speed and I control both ends for now.

            The same data set (4.2Mb) takes >60 seconds in XMLRPC embedded as a string, 18 seconds as a base64, and 4 seconds with some simple text interface instead of XML-RPC. Clearly, expat is the bottle neck.

            Is there a way to force SOAP::Lite to use XML::Parser::Lite? Would that be faster?

            Those times are from starting the client to receiving the answer. The client and the server run on the same machine.

            -Mathieu

            --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
            > Hi, David!
            >
            > > try $data = SOAP::Data->type(base64 => $data);
            > Correct. For XMLRPC, XMLRPC::Data synonim can be used. If you want to
            > use module on server side that works with both XMLRPC and SOAP
            > protocols, than you can safely use SOAP::Data and it'll work in
            > SOAP::Lite and XMLRPC::Lite.
            >
            > Best wishes, Paul.
            >
            > --- David Mullens <damullens@l...> wrote:
            > > try $data = SOAP::Data->type(base64 => $data);
            > >
            > > where $data is the string you want encoded.
            > >
            > > Peace,
            > >
            > > Dave.
            > >
            > > -----Original Message-----
            > > From: soaplite@y... [mailto:soaplite@y...]
            > > Sent: Monday, August 06, 2001 10:07 AM
            > > To: soaplite@y...
            > > Subject: [soaplite] forcing base64 in XMLRPC::Lite
            > > Importance: Low
            > >
            > >
            > > Is there a way to force a string to be encoded in base64 using
            > > XMLRPC::Lite?
            > >
            > > With very large string, the XML Parser seems to take forever.
            > >
            > > Thanks
            > >
            > > -Mathieu
            > >
            > >
            > >
            > > To unsubscribe from this group, send an email to:
            > > soaplite-unsubscribe@y...
            > >
            > >
            > >
            > > Your use of Yahoo! Groups is subject to
            > > http://docs.yahoo.com/info/terms/
            > >
            > >
            > >
            > >
            > > ------------------------ Yahoo! Groups Sponsor
            > >
            > > To unsubscribe from this group, send an email to:
            > > soaplite-unsubscribe@y...
            > >
            > >
            > >
            > > Your use of Yahoo! Groups is subject to
            > > http://docs.yahoo.com/info/terms/
            > >
            > >
            >
            >
            > __________________________________________________
            > Do You Yahoo!?
            > Make international calls for as low as $.04/minute with Yahoo! Messenger
            > http://phonecard.yahoo.com/
          • Paul Kulchenko
            Hi, Mathieu! ... Yes, you can do it with $SOAP::Constants::DO_NOT_USE_XML_PARSER = 1; somewhere after use SOAP::Lite , but before actual calls. ... Such a big
            Message 5 of 7 , Aug 6, 2001
            View Source
            • 0 Attachment
              Hi, Mathieu!

              > Is there a way to force SOAP::Lite to use XML::Parser::Lite? Would
              > that be faster?
              Yes, you can do it with $SOAP::Constants::DO_NOT_USE_XML_PARSER = 1;
              somewhere after 'use SOAP::Lite', but before actual calls.

              I don't think it'll make a difference for you and here is why:
              > The same data set (4.2Mb) takes >60 seconds in XMLRPC embedded as a
              > string, 18 seconds as a base64, and 4 seconds with some simple text
              > interface instead of XML-RPC. Clearly, expat is the bottle neck.
              Such a big difference between text and base64 strings may occur only
              if your string has many character entities. XML::Parser generates
              lots of events in this case where every entity generate their own
              callback. Parsing is quick, but it requires a lot of memory
              processing (even if it's just a concatenation). base64 encoding
              doesn't have this overhead. I believe it's covered with some details
              in PERFORMANCE section in SOAP::Lite doc.

              > is due to the XML parser. Maybe I'll just rewrite the serializer
              > for XMLRPC::Lite to a format that's easier to parse. Non-portable,
              > but what the heck, I need speed and I control both ends for now.
              There is nothing wrong with that. SOAP::Lite provides you ability to
              plug your serializer, deserializer, parser, transports and everything
              else. In fact, I was thinking about it myself. I would like to
              provide set of deserializers, optimized for speed, memory, feature
              set, etc.

              Best wishes, Paul.

              --- mrdamnfrenchy@... wrote:
              > That helps, but the performance is still sucky. Alhough most of it
              > is due to the XML parser. Maybe I'll just rewrite the serializer
              > for XMLRPC::Lite to a format that's easier to parse. Non-portable,
              > but what the heck, I need speed and I control both ends for now.
              >
              > The same data set (4.2Mb) takes >60 seconds in XMLRPC embedded as a
              > string, 18 seconds as a base64, and 4 seconds with some simple text
              > interface instead of XML-RPC. Clearly, expat is the bottle neck.
              >
              > Is there a way to force SOAP::Lite to use XML::Parser::Lite? Would
              > that be faster?
              >
              > Those times are from starting the client to receiving the answer.
              > The client and the server run on the same machine.
              >
              > -Mathieu
              >
              > --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
              > > Hi, David!
              > >
              > > > try $data = SOAP::Data->type(base64 => $data);
              > > Correct. For XMLRPC, XMLRPC::Data synonim can be used. If you
              > want to
              > > use module on server side that works with both XMLRPC and SOAP
              > > protocols, than you can safely use SOAP::Data and it'll work in
              > > SOAP::Lite and XMLRPC::Lite.
              > >
              > > Best wishes, Paul.
              > >
              > > --- David Mullens <damullens@l...> wrote:
              > > > try $data = SOAP::Data->type(base64 => $data);
              > > >
              > > > where $data is the string you want encoded.
              > > >
              > > > Peace,
              > > >
              > > > Dave.
              > > >
              > > > -----Original Message-----
              > > > From: soaplite@y... [mailto:soaplite@y...]
              > > > Sent: Monday, August 06, 2001 10:07 AM
              > > > To: soaplite@y...
              > > > Subject: [soaplite] forcing base64 in XMLRPC::Lite
              > > > Importance: Low
              > > >
              > > >
              > > > Is there a way to force a string to be encoded in base64 using
              > > > XMLRPC::Lite?
              > > >
              > > > With very large string, the XML Parser seems to take forever.
              > > >
              > > > Thanks
              > > >
              > > > -Mathieu
              > > >
              > > >
              > > >
              > > > To unsubscribe from this group, send an email to:
              > > > soaplite-unsubscribe@y...
              > > >
              > > >
              > > >
              > > > Your use of Yahoo! Groups is subject to
              > > > http://docs.yahoo.com/info/terms/
              > > >
              > > >
              > > >
              > > >
              > > > ------------------------ Yahoo! Groups Sponsor
              > > >
              > > > To unsubscribe from this group, send an email to:
              > > > soaplite-unsubscribe@y...
              > > >
              > > >
              > > >
              > > > Your use of Yahoo! Groups is subject to
              > > > http://docs.yahoo.com/info/terms/
              > > >
              > > >
              > >
              > >
              > > __________________________________________________
              > > Do You Yahoo!?
              > > Make international calls for as low as $.04/minute with Yahoo!
              > Messenger
              > > http://phonecard.yahoo.com/
              >
              >
              > ------------------------ Yahoo! Groups Sponsor
              >
              > 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/
              >
              >


              __________________________________________________
              Do You Yahoo!?
              Make international calls for as low as $.04/minute with Yahoo! Messenger
              http://phonecard.yahoo.com/
            • mrdamnfrenchy@yahoo.com
              Hi Paul, I did force to use XML::Parser::Lite, and that made a huge difference. Encoded as a string, it now takes 5.3 seconds instead of 18 seconds. Encoding
              Message 6 of 7 , Aug 6, 2001
              View Source
              • 0 Attachment
                Hi Paul,

                I did force to use XML::Parser::Lite, and that made a huge difference. Encoded as a string, it now takes 5.3 seconds instead of 18 seconds. Encoding it as a base64 is a bit slower (6.5 seconds).

                So at least it's in the ball park as a custom solution, which is a lot better.

                -Mathieu

                > > Is there a way to force SOAP::Lite to use XML::Parser::Lite? Would
                > > that be faster?
                > Yes, you can do it with $SOAP::Constants::DO_NOT_USE_XML_PARSER = 1;
                > somewhere after 'use SOAP::Lite', but before actual calls.
                >
                > I don't think it'll make a difference for you and here is why:
                > > The same data set (4.2Mb) takes >60 seconds in XMLRPC embedded as a
                > > string, 18 seconds as a base64, and 4 seconds with some simple text
                > > interface instead of XML-RPC. Clearly, expat is the bottle neck.
              • Paul Kulchenko
                ... True, it could make a difference sometimes, esp. for CGI apps, because it doesn t need to initiate XML::Parser. yet keep in mind that XML::Parser::Lite
                Message 7 of 7 , Aug 6, 2001
                View Source
                • 0 Attachment
                  > So at least it's in the ball park as a custom solution, which is a
                  > lot better.
                  True, it could make a difference sometimes, esp. for CGI apps,
                  because it doesn't need to initiate XML::Parser. yet keep in mind
                  that XML::Parser::Lite doesn't do entity decoding, so you have to do
                  it on application level if you need to. Future versions may support
                  entity decoding. If you do base64 you shouldn't have any problem
                  though.

                  Best wishes, Paul.

                  --- mrdamnfrenchy@... wrote:
                  > Hi Paul,
                  >
                  > I did force to use XML::Parser::Lite, and that made a huge
                  > difference. Encoded as a string, it now takes 5.3 seconds instead
                  > of 18 seconds. Encoding it as a base64 is a bit slower (6.5
                  > seconds).
                  >
                  > So at least it's in the ball park as a custom solution, which is a
                  > lot better.
                  >
                  > -Mathieu
                  >
                  > > > Is there a way to force SOAP::Lite to use XML::Parser::Lite?
                  > Would
                  > > > that be faster?
                  > > Yes, you can do it with $SOAP::Constants::DO_NOT_USE_XML_PARSER =
                  > 1;
                  > > somewhere after 'use SOAP::Lite', but before actual calls.
                  > >
                  > > I don't think it'll make a difference for you and here is why:
                  > > > The same data set (4.2Mb) takes >60 seconds in XMLRPC embedded
                  > as a
                  > > > string, 18 seconds as a base64, and 4 seconds with some simple
                  > text
                  > > > interface instead of XML-RPC. Clearly, expat is the bottle
                  > neck.
                  >
                  >
                  >
                  > ------------------------ Yahoo! Groups Sponsor
                  >
                  > 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/
                  >
                  >


                  __________________________________________________
                  Do You Yahoo!?
                  Make international calls for as low as $.04/minute with Yahoo! Messenger
                  http://phonecard.yahoo.com/
                Your message has been successfully submitted and would be delivered to recipients shortly.