Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Store Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems.

Go Back   Vista Forums > Vista technology newsgroups > PowerShell

PowerShell performance

Reply
 
Thread Tools Display Modes
Old 04-10-2008   #1 (permalink)
Marco Shaw [MVP]
Guest
 
Posts: n/a

PowerShell performance

There are certain scenarios where certain tasks seem to be more sluggish
in PowerShell. I'm trying to put together an "unofficial list" of
things that seem to run slower in PowerShell versus another *scripting*
language.

If you have any concrete examples, I'd really like to know about them.
Everyone may not be willing to go through the trouble of trying the CTP
and beta releases, but I would definitely try your scenarios in any/all
future versions.

At the very least, perhaps there are some tweaks that can be done to
your existing script to make it run faster just by using a different
approach.

Reply here, or feel free to email me directly. My address on this
message is valid (just remove the "_NO_SPAM_" part).

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
  Reply With Quote

Old 04-12-2008   #2 (permalink)
Pete Zerger
Guest
 
Posts: n/a

Re: PowerShell performance

Hello Marco Shaw [MVP],

You've touched on a topic I've been eager to discuss for some time, so let
me pose a question if I may.

Presumably there are calls to the .NET framework when an instance of Powershell
is instantiated, correct? Would not this process of starting Powershell
when launching as a script as a scheduled task or calling from a bat file
before making WMI, ASDI or other calls result in a longer time to completion?


Regards,

Pete Zerger, MCSE(Messaging) | MCTS(SQL 2005) | MCTS(Opsmgr) | MVP - Opsmgr
URL:http://www.systemcenterforum.org
Training: http://www.systemcenterforum.org/training
User Group: http://www.systemcenterusergroup.com
Quote:

> There are certain scenarios where certain tasks seem to be more
> sluggish in PowerShell. I'm trying to put together an "unofficial
> list" of things that seem to run slower in PowerShell versus another
> *scripting* language.
>
> If you have any concrete examples, I'd really like to know about them.
> Everyone may not be willing to go through the trouble of trying the
> CTP and beta releases, but I would definitely try your scenarios in
> any/all future versions.
>
> At the very least, perhaps there are some tweaks that can be done to
> your existing script to make it run faster just by using a different
> approach.
>
> Reply here, or feel free to email me directly. My address on this
> message is valid (just remove the "_NO_SPAM_" part).
>
> Marco
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
> Blog:
> http://marcoshaw.blogspot.com

  Reply With Quote
Old 04-12-2008   #3 (permalink)
Keith Hill [MVP]
Guest
 
Posts: n/a

Re: PowerShell performance

"Pete Zerger" <pete.zerger@xxxxxx> wrote in message
news:42cbe162b098ca6aa381eeb2f6@xxxxxx
Quote:

> Hello Marco Shaw [MVP],
>
> You've touched on a topic I've been eager to discuss for some time, so let
> me pose a question if I may.
>
> Presumably there are calls to the .NET framework when an instance of
> Powershell is instantiated, correct? Would not this process of starting
> Powershell when launching as a script as a scheduled task or calling from
> a bat file before making WMI, ASDI or other calls result in a longer time
> to completion?
It's not just making some calls - PowerShell is entirely based on the .NET
Framework. It's baked into the core.

--
Keith

  Reply With Quote
Old 04-14-2008   #4 (permalink)
Pete Zerger
Guest
 
Posts: n/a

Re: PowerShell performance

Hello Keith Hill [MVP],

Point taken, but that being said, how does it stack up against traditional
runtime scripting languages in terms of performance and overhead?

Regards,

Pete Zerger, MCSE(Messaging) | MCTS(SQL 2005) | MCTS(Opsmgr) | MVP - Opsmgr
URL:http://www.systemcenterforum.org
Training: http://www.systemcenterforum.org/training
User Group: http://www.systemcenterusergroup.com
Quote:

> "Pete Zerger" <pete.zerger@xxxxxx> wrote in message
> news:42cbe162b098ca6aa381eeb2f6@xxxxxx
>
Quote:

>> Hello Marco Shaw [MVP],
>>
>> You've touched on a topic I've been eager to discuss for some time,
>> so let me pose a question if I may.
>>
>> Presumably there are calls to the .NET framework when an instance of
>> Powershell is instantiated, correct? Would not this process of
>> starting Powershell when launching as a script as a scheduled task or
>> calling from a bat file before making WMI, ASDI or other calls result
>> in a longer time to completion?
>>
> It's not just making some calls - PowerShell is entirely based on the
> .NET Framework. It's baked into the core.
>
> --
> Keith

  Reply With Quote
Old 04-14-2008   #5 (permalink)
Herb Martin
Guest
 
Posts: n/a

Re: PowerShell performance


"Pete Zerger" <pete.zerger@xxxxxx> wrote in message
news:42cbe162bbd8ca6c50c06c170e@xxxxxx
Quote:

> Hello Keith Hill [MVP],
>
> Point taken, but that being said, how does it stack up against traditional
> runtime scripting languages in terms of performance and overhead?
I am just guessing, but from my limited experience with Powershell it seemed
unreasonably slow to start a NEW powershell session, while Perl, Ruby,
PHP, even Lisp, seem reasonably quick.

This is purely an anecdotal report and isn't even based on actual timings,
but
the effect seemed so obvious to me that I never questioned it and just tend
to use other tools rather than Powershell when they will solve the same
problem.


  Reply With Quote
Old 04-15-2008   #6 (permalink)
Tim Munro
Guest
 
Posts: n/a

Re: PowerShell performance

Just to add to this, I've written the exact same script in Powershell and
WSH. WSH is clearly faster, by a matter of real time minutes.
Powershell may be spiffy and powerfull, but it's a slug in terms of
performance. (just my $0.02 worth)

--
Tim.

"Herb Martin" <news@xxxxxx> wrote in message
news:O7zwropnIHA.6064@xxxxxx
Quote:

>
> "Pete Zerger" <pete.zerger@xxxxxx> wrote in message
> news:42cbe162bbd8ca6c50c06c170e@xxxxxx
Quote:

>> Hello Keith Hill [MVP],
>>
>> Point taken, but that being said, how does it stack up against
>> traditional runtime scripting languages in terms of performance and
>> overhead?
>
> I am just guessing, but from my limited experience with Powershell it
> seemed
> unreasonably slow to start a NEW powershell session, while Perl, Ruby,
> PHP, even Lisp, seem reasonably quick.
>
> This is purely an anecdotal report and isn't even based on actual timings,
> but
> the effect seemed so obvious to me that I never questioned it and just
> tend
> to use other tools rather than Powershell when they will solve the same
> problem.
>

  Reply With Quote
 
Reply

Thread Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48