Re: [Slightly OT] Perl interpreter (win32) single "threaded"?
From: Brian McCauley (nobull_at_mail.com)
Date: 12/17/04
- Next message: Brian McCauley: "Re: [Q] $ARGV, <>, and command-line Perl"
- Previous message: Brian McCauley: "Re: Restricted Subsets of Perl"
- In reply to: JayEs: "Re: [Slightly OT] Perl interpreter (win32) single "threaded"?"
- Next in thread: Brian McCauley: "Re: [Slightly OT] Perl interpreter (win32) single "threaded"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Dec 2004 10:05:16 +0000
JayEs wrote:
>>Well I have at last manged to run your script on a WinXP box and with
>>one copy in does look subjectively jerky. Most of the time the time
>>waiting on external resources - nowhere near maxing-out the CPU.
>
>
> Please define "jerkey" :-)
>
> Seriously, when you say "waiting on external resources", do you mean,
> waiting for the site to respond or for resources outside of Perl but local
> to the machine?
All I can say for sure is they are not CPU-bound or VM-bound.
> Do you thibk I should use LWP instead of the Mech?
AFAIK WWW::Mechanize uses LWP. Since whatever the problem is (if there
is a problem) it's not in the Perl process I doubt that can make a
difference.
>
>>Appart from subjective observations do you have anything to support the
>>hypothesis that the Perl processes are waiting on each other?
>
>
> That's why I was reluctant to post code, "Jerkey" is not how I would
> describe the performance of the script, at least not on our servers, but I
> don't know what that means in that I don't see a performance degrade between
> different sites I try (our or external).
Ah. Are you are running this on servers? I'm running it on a
workstaion. The rules for process scheduling on servers are designed to
maximize throughput rather than to maximize the illusion of concurrency.
> I do notice that if you put a bunch
> of print statements in and then run 10 at a time (either started in a .bat
> or just have perl start 10 copies) you never see any simultaneous action, or
> so it seems from subjective observation....
Well I've just tried that using the minimal but complete script below:
$|=1; print $i++ while 1;
With 10 of these running on the Workstation version of XP there is no
jerkyness perceptable to the eye and a perfect illusion of concurrency.
> It gets crazy when you use IE::Mech. Or at least I see things I don't
> expect... One script started say, 5 times, you see it fill in a box in one
> IE window, move to the next and fill same box there, move to the next ect...
> until it done all five before the process repeats for the next text box....
> I swear the same thing in VB gives me near simultaneous execution.
>
> What gives?
As I say I've no experience of Win32::IE::Mechanize (but I expect to
have some by Christmas). I'll get back to you on that.
- Next message: Brian McCauley: "Re: [Q] $ARGV, <>, and command-line Perl"
- Previous message: Brian McCauley: "Re: Restricted Subsets of Perl"
- In reply to: JayEs: "Re: [Slightly OT] Perl interpreter (win32) single "threaded"?"
- Next in thread: Brian McCauley: "Re: [Slightly OT] Perl interpreter (win32) single "threaded"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|