提交 22cdd2c5 编写于 作者: C Cyrus Najmabadi

Avoid a few more allocations in another DocumentState path.

上级 efa39338
...@@ -363,7 +363,12 @@ public new DocumentState UpdateText(TextLoader loader, PreservationMode mode) ...@@ -363,7 +363,12 @@ public new DocumentState UpdateText(TextLoader loader, PreservationMode mode)
? CreateStrongText(loader, this.Id, this.solutionServices, reportInvalidDataException: true) ? CreateStrongText(loader, this.Id, this.solutionServices, reportInvalidDataException: true)
: CreateRecoverableText(loader, this.Id, this.solutionServices, reportInvalidDataException: true); : CreateRecoverableText(loader, this.Id, this.solutionServices, reportInvalidDataException: true);
var newTreeSource = CreateLazyFullyParsedTree( // Only create the ValueSource for creating the SyntaxTree if this is a Document that
// supports SyntaxTrees. There's no point in creating the async lazy and holding onto
// this data otherwise.
var newTreeSource = !this.SupportsSyntaxTree
? ValueSource<TreeAndVersion>.Empty
: CreateLazyFullyParsedTree(
newTextSource, newTextSource,
this.Id.ProjectId, this.Id.ProjectId,
GetSyntaxTreeFilePath(this.info), GetSyntaxTreeFilePath(this.info),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册