









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Python tight loop causing massive CPU barfage
Steve Milo wrote:
>Perl is optimized for processing data in large amounts, Python was designed
>to be a threading/cluster language to handle pipes and processes.
>
>The C library's involved play one part in the utilization of the languages.
>
>But right now, like Paul said, he just needs to optimize what he has.
>
>Steve M
>
>
Based on some of the comments regarding Perl versus Python, and just to
see what would happen, I re-ordered the script to use a seperate thread
(one at a time) for each file scan.
It's fast! And it doesn't use up as much cpu time, for some reason. I
confess, I have no idea what's going on there - but it does work!
If anyone feels like playing with it here's a link:
http://www.sayinghi.com/files/wanda.tar.gz
And thanks for everyone's advice!
|
|