roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Visual Studio 2022 17.8.0 Preview 2.0: Lengthy string variable makes VS very slow

Open vsfeedback opened this issue 2 years ago • 2 comments

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] I have a string variable containing the following.

var payload = new StringContent($$"""
{
    "flowDefinitionId": {{flowDefinition.Id}},
    "data": {
        "containerName": "document-analyser-samples",
        "blobName": "Base64/Compliance-Base64-{{Guid.NewGuid()}}.png",
        "blobContent": ""
    }
}
""");

And when I am working on this particular class file, I can't even type anything without a huge delay.


Original Comments

Jaliya Udagedara on 10/8/2023, 10:40 PM:

(private comment, text removed)

Alison Jin [MSFT] on 10/9/2023, 01:42 AM:

(private comment, text removed)

Jaliya Udagedara on 10/30/2023, 01:37 AM:

(private comment, text removed)

Feedback Bot on 10/17/2023, 11:54 PM:

(private comment, text removed)

Feedback Bot on 10/30/2023, 06:22 PM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Nov 08 '23 20:11 vsfeedback

I can't repro this. Need more info from customer to form a full repro where this happens to figure out what's going on.

CyrusNajmabadi avatar Nov 08 '23 20:11 CyrusNajmabadi

@CyrusNajmabadi,

At least for me it's pretty easy to reproduce.

Visual Studio Envrionement

Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview
Version 17.8.0 Preview 7.0

Code

string str = "iVB..."; // lengthy string

// TODO: Write any code
// Visual Studio is lagging completely

.cs proj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <!--<TargetFramework>net7.0</TargetFramework>-->
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

Tried with .NET 7 as well as with .NET 8, same result.

I am attaching a sample project. Please do let me know if you still can't reproduce, and I am more than happy to get into a call or anything. ConsoleApp1.zip

jaliyaudagedara avatar Nov 11 '23 02:11 jaliyaudagedara

I still don't repro this at all. If you're having issues here report feedback in VS, but this time asking it to take a recording, so that the perflogs are included and we can see what the issue is.

CyrusNajmabadi avatar Oct 24 '25 16:10 CyrusNajmabadi