Robert Klemme
10/24/2008 7:35:00 AM
2008/5/28 Srijayanth Sridhar <srijayanth@gmail.com>:
> I have a script which basically launches several threads, each of them
> parsing a web page from a different link using Hpricot. I am not sure
> how many threads get spawned, could be in the hundreds.
I doubt the usefulness of this. Since Ruby uses green threads chances
are that your overall throughput could be better if you limit the
number of threads. This also has the effect of reducing the amount of
memory needed at a point in time. I'd seriously question this design.
If you have multiple cores in your system and want to take advantage
of them using multiple processes might also be an option.
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end