Subject: | Use an external program instead of forking |
I have a POE::Component::IRC bot in which I was using your
GoogleCalculator plugin, but I decided to stop using it when I realized
that the POE component behind it uses a POE::Wheel::Run which forks.
This is not very appealing for long-running applications. My IRC bot
already takes 38MB of RAM without the calc plugin and I don't want the
memory usage to more than double just by loading that one little plugin.
I realize that POE::Component::WWW::Google::Calculator doesn't use
POE::Component::NonBlockingWrapper::Base but you probably have plans to
make it do that eventually, which is why I'm filing the bug here.
I suggest you look into wrapping the non-blocking modules with a
POE::Wheel::Run which executes an external program. You could use
POE::Component::Generic and enable its 'alt_fork' option which does
exactly that. Or you could roll your own. I recently ported one of my
own POE components to do this:
http://github.com/hinrik/poe-component-hailo/blob/master/lib/POE/Component/Hailo.pm