Unless you are parsing a really huge piece of XML or HTML,
I don't suggest doing it in a non-blocking manner. It is a
CPU intensive process, so you won't gain anything from
having POE wait for it instead of your own function.
Beside, for anything less than 1MB, it will probably be
fast enough to be unnoticeable to the app response time.
That being said, if you are parsing multi-megabytes XML
documents, you may want to break the parsing in smaller
chunks to allow POE to deal with incoming network requests
and whatnot.
--- Martijn van Beers <martijn@xxxxxxxxxx> wrote:
> On Thu, 2006-04-20 at 14:49 -0700, yhoo5ucks@xxxxxxxxx
> wrote:
> > I've seen some poe snippets and modules, but I've yet
> to find a
> > complete, and relatively complex application that uses
> many components.
> > Can somebody point me to a project that shows how this
> can be done. I
> > suspect something like the dailystrips design
> > (http://poe.perl.org/?Rocco/features_for_dailystrips)
> on the wiki page
> > would be perfect. I'd also really love to see how html
> or xml message
> > parsing can be done in a non-blocking way (doesn't look
> like poco http
> > can use filters). Thanks in advance.
>
> Hrm, yes. That's one of the things I still needed doing
> before I stopped
> working on Client::HTTP. You might want to try
> implementing it yourself
> if you desperately need it. Shouldn't be too hard I
> think. Add a
> parameter to Client::HTTPRequestFactory->new(), and use
> that in
> poco_weeble_io_read() (in HTTP.pm) instead of the
> hardcoded
> Filter::Stream.
>
>
> Martijn
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|