entra-powershell icon indicating copy to clipboard operation
entra-powershell copied to clipboard

First execution of Entra command is extremely slow

Open alexandair opened this issue 2 years ago • 3 comments

It doesn't matter which Entra command I run after Connect-MgGraph, its execution is extremely slow. 45-50 seconds. When I run it for the second time, it runs fast as expected.

alexandair avatar Dec 21 '23 00:12 alexandair

The question here if we can see the same behavior for the regular MS Graph Commands, then the issue needs to be fixed by the SDK team.

rtintor avatar Jan 08 '24 18:01 rtintor

Compare these two executions: speed1

alexandair avatar Jan 08 '24 19:01 alexandair

@rtintor: See above data point from @alexandair.

SteveMutungi254 avatar Jan 09 '24 11:01 SteveMutungi254

Hi, @alexandair,

We are pleased to announce the successful implementation of modularization in Entra PowerShell. We sincerely appreciate the time you took to help us investigate, troubleshoot, and contribute. Your support means the world to us.

The improvements are available from version 0.22.0 onwards. We have also finalized the update to our Entra PowerShell public Learn documentation with these changes.

I will proceed to close this issue. If any bugs arise, we will re-open it. Tagging you for awareness.

Related issue: https://github.com/microsoftgraph/entra-powershell/issues/890

SteveMutungi254 avatar Jan 23 '25 12:01 SteveMutungi254

Execution of Entra commands is much faster now.

Is there a reason why Microsoft.Entra.Users has 3 direct dependencies (Microsoft.Graph.Users, Microsoft.Graph.Users.Actions, and Microsoft.Graph.Users.Functions)?

That makes first execution of, for example, Get-EntraUser (15.5 seconds) significantly slower than Get-MgUser (3.5 seconds).

alexandair avatar Jan 23 '25 22:01 alexandair