Why does returning a variable take so long?

Why does returning a variable take so long?

avatar
Product: PowerShell Universal
Version: v4


script : return $Secret:graphsecret

We are running latest version of 4 and hosting our DB using SQL in azure.

663a1fad04efb3ace5569f29e9b657121b57eb32


Why would this process take 22 seconds with the integrated environment?

663a1fad04efb3ace5569f29e9b657121b57eb32.png

All Comments (2)

avatar

When calling a secret variable, it retrieves the variable from the database and then decrypts the value. It should be almost instant. The serialization should take a few milliseconds. The database query should also be really quick unless you have tens of thousands of secret variables.

Increasing the system log level may help determine where the slow down could be coming from.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

avatar

I think this had something to do with us running SQL in azure. We ended up reverting to a local db for now.