Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Compiled perl executable

Reply
Thread Tools

Compiled perl executable

 
 
owinsloe@gmail.com
Guest
Posts: n/a
 
      07-08-2008
Anyone else noticed on Windows that when you run a compiled perl
script (compiled using pp) it causes TWO copies of the executable to
run? I'm running perl5.8.8 and previously perl5.8.6. A compile of the
same script in 5.8.6 only runs one copy. I want to revert to only one
copy, ....2 copies looks ugly and can be confusing as to whats going
on (through Windows task manager), especially if you are running
multiple instances of the same executable. Ta
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      07-08-2008

Quoth http://www.velocityreviews.com/forums/(E-Mail Removed):
> Anyone else noticed on Windows that when you run a compiled perl
> script (compiled using pp) it causes TWO copies of the executable to
> run? I'm running perl5.8.8 and previously perl5.8.6. A compile of the
> same script in 5.8.6 only runs one copy. I want to revert to only one
> copy, ....2 copies looks ugly and can be confusing as to whats going
> on (through Windows task manager), especially if you are running
> multiple instances of the same executable. Ta


If you use Sysinternals' procexp.exe instead of Task Manager, you will
see that one is the child of the other: the parent is the instance you
started, and the child is a new copy that has been created in the par-
xxxx temp directory and is the one actually doing all the work. I don't
really know why this is necessary, but it's probably part of getting
Windows' dll loader to do the right thing.

Ben

--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] (E-Mail Removed)
 
Reply With Quote
 
 
 
 
Tad J McClellan
Guest
Posts: n/a
 
      07-08-2008
(E-Mail Removed) <(E-Mail Removed)> wrote:

> Excuse me, gents. What is 'pp'?



http://search.cpan.org/~smueller/PAR....980/lib/pp.pm


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
 
Reply With Quote
 
nolo contendere
Guest
Posts: n/a
 
      07-09-2008
On Jul 7, 10:52*pm, (E-Mail Removed) wrote:
> Anyone else noticed on Windows that when you run a compiled perl
> script (compiled using pp) it causes TWO copies of the executable to
> run? I'm running perl5.8.8 and previously perl5.8.6. A compile of the
> same script in 5.8.6 only runs one copy. I want to revert to only one
> copy, ....2 copies looks ugly and can be confusing as to whats going
> on (through Windows task manager), especially if you are running
> multiple instances of the same executable. Ta


why did you compile it? what's the performance comparison against the
uncompiled version?
 
Reply With Quote
 
nolo contendere
Guest
Posts: n/a
 
      07-09-2008
On Jul 8, 1:38*am, (E-Mail Removed) wrote:

> Excuse me, gents. *What is 'pp'?


for detailed info, google 'perl pp'.
 
Reply With Quote
 
O
Guest
Posts: n/a
 
      07-09-2008
On Jul 8, 3:09 pm, Ben Morrow <(E-Mail Removed)> wrote:
> Quoth (E-Mail Removed):
>
> > Anyone else noticed on Windows that when you run a compiled perl
> > script (compiled using pp) it causes TWO copies of the executable to
> > run? I'm running perl5.8.8 and previously perl5.8.6. A compile of the
> > same script in 5.8.6 only runs one copy. I want to revert to only one
> > copy, ....2 copies looks ugly and can be confusing as to whats going
> > on (through Windows task manager), especially if you are running
> > multiple instances of the same executable. Ta

>
> If you use Sysinternals' procexp.exe instead of Task Manager, you will
> see that one is the child of the other: the parent is the instance you
> started, and the child is a new copy that has been created in the par-
> xxxx temp directory and is the one actually doing all the work. I don't
> really know why this is necessary, but it's probably part of getting
> Windows' dll loader to do the right thing.
>
> Ben
>
> --
> It will be seen that the Erwhonians are a meek and long-suffering people,
> easily led by the nose, and quick to offer up common sense at the shrine of
> logic, when a philosopher convinces them that their institutions are not based
> on the strictest morality. [Samuel Butler, paraphrased] (E-Mail Removed)


Thanks Ben, I guessed that was the case. The behaviour must have
changed as it did not do this for 5.8.6 (only ran one exe). If
possible I would like to go back to having only one exe but I could
not find anything through the PAR/PP doc that suggested there was a
compile time option that would achieve this.
 
Reply With Quote
 
O
Guest
Posts: n/a
 
      07-09-2008
On Jul 8, 5:38 pm, (E-Mail Removed) wrote:
> On Tue, 8 Jul 2008 04:09:06 +0100, Ben Morrow <(E-Mail Removed)> wrote:
>
> >Quoth (E-Mail Removed):
> >> Anyone else noticed on Windows that when you run a compiled perl
> >> script (compiled using pp) it causes TWO copies of the executable to
> >> run? I'm running perl5.8.8 and previously perl5.8.6. A compile of the
> >> same script in 5.8.6 only runs one copy. I want to revert to only one
> >> copy, ....2 copies looks ugly and can be confusing as to whats going
> >> on (through Windows task manager), especially if you are running
> >> multiple instances of the same executable. Ta

>
> >If you use Sysinternals' procexp.exe instead of Task Manager, you will
> >see that one is the child of the other: the parent is the instance you
> >started, and the child is a new copy that has been created in the par-
> >xxxx temp directory and is the one actually doing all the work. I don't
> >really know why this is necessary, but it's probably part of getting
> >Windows' dll loader to do the right thing.

>
> >Ben

>
> Excuse me, gents. What is 'pp'?


Its part of the Perl PAR package that allows you to compile your
scripts into an executable. This enables you to distribute to another
server/pc that does not have Perl installed ->
http://search.cpan.org/~autrijus/PAR-0.85/script/pp



 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      07-09-2008

Quoth O <(E-Mail Removed)>:
> On Jul 8, 3:09 pm, Ben Morrow <(E-Mail Removed)> wrote:
> > Quoth (E-Mail Removed):
> >
> > > Anyone else noticed on Windows that when you run a compiled perl
> > > script (compiled using pp) it causes TWO copies of the executable to
> > > run?

<snip>
> >
> > If you use Sysinternals' procexp.exe instead of Task Manager, you will
> > see that one is the child of the other: the parent is the instance you
> > started, and the child is a new copy that has been created in the par-
> > xxxx temp directory and is the one actually doing all the work. I don't
> > really know why this is necessary, but it's probably part of getting
> > Windows' dll loader to do the right thing.

>
> Thanks Ben, I guessed that was the case. The behaviour must have
> changed as it did not do this for 5.8.6 (only ran one exe). If
> possible I would like to go back to having only one exe but I could
> not find anything through the PAR/PP doc that suggested there was a
> compile time option that would achieve this.


I rather doubt it's related to perl version. It's much more likely
related to either PAR.pm version or the options you passed to
PAR:acker. AFAICT, with current versions of pp you get two instances
if you don't pass -d or if your perl wasn't built with a shared libperl
(but practically all Win32 perls are), but I don't really understand any
of this so ICBW.

Ben

--
I must not fear. Fear is the mind-killer. I will face my fear and
I will let it pass through me. When the fear is gone there will be
nothing. Only I will remain.
(E-Mail Removed) Frank Herbert, 'Dune'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: gcj compiled executable performance Arne Vajh°j Java 7 04-04-2010 07:31 PM
If I create a page, then it's compiled upon first request, where cani find the compiled code?? lander ASP .Net 5 03-05-2008 04:34 PM
Length of Variable Names Affect Compiled Executable? John C Programming 16 09-29-2006 09:41 AM
g++ compiled C++ code called from gcc compiled C code Klaus Schneider C++ 1 12-02-2004 01:44 PM
Re: Finding the full path of a c++ compiled executable in Visual C++ Josephine Schafer C++ 1 07-21-2003 09:44 AM



Advertisments