Community
    • Login

    Lag spikes/freezes when using multiline String in ps1 file

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 719 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Kevin HoltkampK Offline
      Kevin Holtkamp
      last edited by

      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.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @Kevin Holtkamp
        last edited by

        @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.)

        1 Reply Last reply Reply Quote 3

        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors