Questions, questions, questions... on how to improve (WHAT an improvement !!!)

Questions, questions, questions... on how to improve (WHAT an improvement !!!)

Post by Jacob Saab » Tue, 11 Dec 2007 18:55:59


Hey Marco,

I'm just playing around with my script right now. It seems if you put -readcount
on get-content,
it DRAMATICALLY increases the performance !

I have a set of logfiles I'm running my script on for test purposes. It consists
of 91 logfiles,
taking up 87mb of space.

With -readcount 500 the script plows through them in 10 seconds flat.

Without -readcount... well, now I understand why my original script performs
like a mule on the
Nrnberg Ring. It takes 9 minutes 22 seconds !!!

That's ... an insane difference ! 562 seconds without -readcount. 10 seconds
with. I ran the script
twice, just to verify that it wasn't a one time deal. 9 minutes 17 seconds
the second time without
-readcount.

Only worry I have, is that when I set -readcount to 500, there was a difference
in the output. Without
-readcount, the list was full, with readcount, 2 names were missing in the
list. But upping -readcount
to 1000 fixed it. Any take on what might've happened there ?

Seems blockreading is a good thing after all :)

Best Regards,
Jacob Saaby Nielsen
mailto: XXXX@XXXXX.COM
 
 
 

Questions, questions, questions... on how to improve (WHAT an improvement !!!)

Post by Marco Shaw » Tue, 11 Dec 2007 21:47:03


Good job reading the docs... ;-) I forgot about that parameter.

As for dropping lines, I will try to do a test. Could be a bug if it
can be reproduced.

Marco

--
Microsoft MVP - Windows PowerShell
http://www.yqcomputer.com/

PowerGadgets MVP
http://www.yqcomputer.com/

Blog:
http://www.yqcomputer.com/