Re: [Slightly OT] Perl interpreter (win32) single "threaded"?

From: Brian McCauley (nobull_at_mail.com)
Date: 12/17/04


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.



Relevant Pages

  • Re: While Im brainstorming...
    ... >> ...and waiting for the servers to come back on: ... >> supplies. ... I would jump on this type in a second. ...
    (alt.games.warcraft)
  • Re: SMS is not publishing to Active Directory.
    ... is still no site information in the system management container. ... servers will be polled in 1 ... A new master site control file was not available. ...
    (microsoft.public.sms.setup)
  • Re: best practices - domain or no domain
    ... >Okay, really bad joke. ... But it's Friday and I'm stuck at work late ... >waiting for files to move between servers. ...
    (microsoft.public.inetserver.iis.security)
  • Re: ORBS
    ... At 05:46 PM 7/15/2001, Robert E. Lee wrote: ... >Has anyone here successfully used the servers from www.orbz.org? ... I'm still waiting to learn more about orbz.org, orbl.org, ordb.org, ...
    (FreeBSD-Security)