DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Version 3.2.0-preview.5 slowness

Open Gijsreyn opened this issue 3 months ago • 2 comments

Prerequisites

  • [x] Write a descriptive title.
  • [x] Make sure you are able to repro it on the latest version
  • [x] Search the existing issues.

Summary

After the release of v3.2.0-preview.5, the discovery has significantly decreased.

Steps to reproduce

  1. Use the Install-DscExe command to install v3.2.0-preview.4: Install-DscExe -IncludePrerelease -Verbose -Force -Version 3.2.0-preview.4`
  2. Run the following command:
Measure-Command -Expression { dsc config get --file hello_world.dsc.bicep }
⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠉ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠙ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠚ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠉ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠙ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠚ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠒ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠂ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠂ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠒ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠲ [00:00:00] [████████████████████████████████████████]       1/1       Searching for resources                         
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 6
Milliseconds      : 305
Ticks             : 63059564
TotalDays         : 7.29856064814815E-05
TotalHours        : 0.00175165455555556
TotalMinutes      : 0.105099273333333
TotalSeconds      : 6.3059564
TotalMilliseconds : 6305.9564
  1. In the same session, install preview-5: Install-DscExe -IncludePrerelease -Verbose -Force -Version 3.2.0-preview.5
  2. Run the same example
⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠉ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠙ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠚ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for extensions                        ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠁ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠉ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠙ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠚ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠒ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠂ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠂ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠒ [00:00:00] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]       0/1       Searching for resources                         ⠲ [00:00:00] [████████████████████████████████████████]       1/1       Searching for resources                         
                                                                                                                       n
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 53
Milliseconds      : 603
Ticks             : 536039311
TotalDays         : 0.000620415869212963
TotalHours        : 0.0148899808611111
TotalMinutes      : 0.893398851666667
TotalSeconds      : 53.6039311
TotalMilliseconds : 53603.9311

Expected behavior

Time hasn't increased to execute the resource.

Actual behavior

Takes more than 50 seconds.

Error details


Environment data

Name                           Value
----                           -----
PSVersion                      7.5.3
PSEdition                      Core
GitCommitId                    7.5.3
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.2.0-preview.5

Visuals

No response

Gijsreyn avatar Sep 18 '25 06:09 Gijsreyn

After creating this issue, I realized it has probably something to do with #1118.

Gijsreyn avatar Sep 18 '25 06:09 Gijsreyn

I also think #1118 is causing the slowness since DSC is trying to find the version specified and when not found, it starts calling all the adapters and both PowerShell and WMI can return lots before DSC fails

SteveL-MSFT avatar Oct 01 '25 22:10 SteveL-MSFT