perf: mark entire reported info tree as persistent (#5040)

As we can definitely not free it until .ilean generation at the very end
This commit is contained in:
Sebastian Ullrich 2024-08-14 15:39:35 +02:00 committed by GitHub
parent ac64cfd70a
commit 20a7fe89b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -599,7 +599,7 @@ where
let minimal := internal.minimalSnapshots.get scope.opts && !Parser.isTerminalCommand stx
finishedPromise.resolve {
diagnostics := (← Snapshot.Diagnostics.ofMessageLog cmdState.messages)
infoTree? := cmdState.infoState.trees[0]!
infoTree? := Runtime.markPersistent cmdState.infoState.trees[0]!
cmdState := if minimal then {
env := initEnv
maxRecDepth := 0