I can reliably leak gigabytes of memory per minute when editing M code in the advanced editor, leading to performance degradation of UI interactions and eventually process crashes with out-of-memory errors.
The data is all from Advent of Code 2022 and is therefore not sensitive.
Open the pbix
Open the PQ window
Select any existing query
Open the advanced editor
Begin adding query steps and editing the code (specifically code and not comments), making sure to leave enough time to get completion pop-ups
Close the advanced editor
Close the Power Query window, but do not close Power BI Desktop (applying the new changes does not make a difference)
Repeat from step 2
By following these steps, I can reliable get my PBI Desktop process up to 10GB of RAM (out of 16GB on the VM) consumed, at which point it becomes unstable and nonresponsive, either crashing with a webview2 memory error or hanging until I kill it through task manager.
Note, that you must have intellisense enabled (the default), and you must interact with intellisense completions while editing code in the advanced editor. Memory consumed by this process seems never to be freed.