-
-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
I run 2 scripts
- In Sitecore Powershell ISE
$criteria = @(
@{Filter = "Equals"; Field = "_haslayout_b"; Value = $True}
)
$props = @{
Index = "sitecore_master_index"
Criteria = $criteria
}
Find-Item @props
- In Powershell ISE on the same machine
Import-Module -Name SPE
$session = New-ScriptSession -Username admin -Password b -ConnectionUri https://xmcloudcm.localhost/
Invoke-RemoteScript -ScriptBlock {
$criteria = @(
@{Filter = "Equals"; Field = "_haslayout_b"; Value = $True}
)
$props = @{
Index = "sitecore_master_index"
Criteria = $criteria
}
Find-Item @props
} -Session $session
The first script executes immediately. It returns 400 records.
The second script runs for a very long time, or forever. After finishing, Sitecore starts to work slowly. Even the first script executes much more slowly.
When I optimize the script with Select-Object
and select only the fields that I need, the issue disappears.
But the serialization of 400 search results doesn't sound like something crazy. Additionally, Sitecore is starting to work slowly after performing the serialization, so there may be an issue with the serialization process.
Question:
Is Sitecore PowerShell Remoting rely on Microsoft CLIXML binaries? Or is it something inside this repository that probably could be optimized?
Metadata
Metadata
Assignees
Labels
No labels