Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I think the significant value can be found in the file:expat.xs (part of the XML::Parser package) which has this at line 35

#define BUFSIZE 32768

Which suggests that you might be able to rebuild just the xs part of the package to adjust the buffersize.

That said, there is no guarentee that this will work or would fix your problem. I've never tried using XML::Parser in stream mode, but I wonder how effective it is for real-time parsing of streaming XML-like data? It appears to geared more to parsing fully complient XML documents rather than XML-like streams.

If its important for your application to decode XML-like markup in a timely manner, you may have to consider using something like XML::Parser::Lite instead. This would mean reading the socket yourself and passing the markup to the parser in chunks as you read it. The interface is (as the name suggests) like a cut down version of the XML::Parser interface, but it uses pure perl and regexes to do th parsing which should mena that you would have a lot more control over the process.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

In reply to Re: XML::Parser Streams performing undesired buffering by BrowserUk
in thread XML::Parser Streams performing undesired buffering by lhoward

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (2)
    As of 2020-11-30 08:12 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found