-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache internal objects used by the formatting engine. #73487
Conversation
} | ||
|
||
protected SyntaxFormattingOptions Options { get; } | ||
protected string Language => _language; | ||
protected LineFormattingOptions Options { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all consumers only need the limited amount of info exposed by LineFormattingOPtions, not the full info in SyntaxFormattingOptions.
} | ||
|
||
protected SyntaxFormattingOptions Options { get; } | ||
protected string Language => _language; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never used. Removed.
|
||
protected AbstractTriviaDataFactory(TreeData treeInfo, SyntaxFormattingOptions options) | ||
protected AbstractTriviaDataFactory(TreeData treeInfo, LineFormattingOptions options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check. But it is exposed as a property on this type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, that is used by the derived factories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drops allocations by 2.2%. Review a commit at a time.