spjeff / spbestwarmup

Tired of waiting for SharePoint pages to load? Want something easy to support? That works on all versions? This warmup script is for you!
2 stars 0 forks source link

Long running script #31

Closed Struijky closed 3 years ago

Struijky commented 3 years ago

When running SPBestWarmUp.ps1 from the PowerShell console it takes several minutes before any output is displayed. I figured out this caused by the CreateLog() function: The check for the presence of the SPBestWarmUp Event Log Source: !(Get-EventLog -LogName Application -Source "SPBestWarmUp" -ErrorAction SilentlyContinue) Collects all SPBestWarmUp Events which consumes a lot of time. I know Event Logs need to be cleaned on a regular basis but besides I prefer to run the check with the '-Newest 1' parameter like: !(Get-EventLog -LogName Application -Source "SPBestWarmUp" -Newest 1 -ErrorAction SilentlyContinue)

spjeff commented 3 years ago

Excellent idea Struijky. Updated PS1 code with "-Newest 1"

spjeff commented 3 years ago

https://github.com/spjeff/spbestwarmup/commit/27d04f04e9c1a96eb128edce1161f70dc52efd3a#diff-13f1021d544874b5cf340e171b1a24f5e973a9cd9fa5d5b4cecd482a2966fc25

Struijky commented 3 years ago

Hi Jeff,

My pleasure to help, great script btw., I advise most of my customers to implement it. I ran into this issue by accident and thought I should report it.

Best regards,

Hans Struijk

Senior SharePoint Consultant, Architect Spoormakerserf 91 5706 KX Helmond +31 (0) 6 13326926 info@sigylon.nlmailto:info@sigylon.nl [cid:image002.png@01D6D90B.44F4A640]

From: Jeff Jones notifications@github.com Sent: dinsdag 22 december 2020 23:52 To: spjeff/spbestwarmup spbestwarmup@noreply.github.com Cc: Hans Struijk (Sigylon) info@sigylon.nl; Author author@noreply.github.com Subject: Re: [spjeff/spbestwarmup] Long running script (#31)

Excellent idea Struijky. Updated PS1 code with "-Newest 1"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/spjeff/spbestwarmup/issues/31#issuecomment-749819931, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQAZHGUSZ7LKLQAV6JAXSTSWEPKHANCNFSM4VFQJFTA.