This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
High memory consumption due to ContextCache #1182
Labels
status:tracked
Triaged and are being investigated further
Reporting an Issue
High memory consumption due to ContextCache on running PnPPowershell commands for large number of items.
Expected behavior
Memory consumption should be low, or there should be a method to clear context cache.
Actual behavior
I am running PnP Powershell for SharePOint Online iterating over large number of items in a single library (more than 50,000 items ).
I have noticed that the the memory consumption for powershell increases till it consumes upto 4 GB.
On profiling the memory i discovered all the memory is consumed by ContextCache of SPOnlineConnection. (refer attached screenshot).

Steps to reproduce behavior
The scripts are simple operations e.g.
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
2.16.1706.0
How did you install the PnP-PowerShell Cmdlets?
The text was updated successfully, but these errors were encountered: