Lag spikes/freezes when using multiline String in ps1 file
-
Hey everyone, sorry if this is the wrong place to post this, i am new here.
In my powershell script i have a multiline String like this:
@" string content "@Since i added that, i had those lag spikes/freezes where the program would freeze for a second. Since i removed the string, the problem dissapeared.
I have the language set to powershell, so it highlights keywords etc., so i suspect that somewhere in that highlighting, there is a point where it hangs at multiline strings. -
@Kevin-Holtkamp said in Lag spikes/freezes when using multiline String in ps1 file:
@"
string content
"@With a powershell file with just that content, I don’t notice any lag / freezes. My guess is something else is going on.
Please go to the ? menu, select Debug Info, and paste the results into the forum.
Also, see if it freezes for you when all you have in your powershell file is
@" string content "@If it does freeze from just that, let us know. If not, there is going to have to be more debug.
My guess is something else is going on: either it’s because of a really long file, or because of one or more plugins, or both. (There could also be many things I haven’t considered.)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login