Merged
Conversation
This switches the `TeeLogger` from using the `appendFile` function to manually opening and closing a file handle and calling `appendFile` on the file handle. This results in a more efficient implementation as the file handle is only opened once and closed once, instead of being opened and closed for every log message. This should result in less "too many open files" errors.
| // display and sorting might depend on the number of results | ||
| await this.queryHistoryManager.refreshTreeView(); | ||
|
|
||
| if (isDisposable(this.logger)) { |
Contributor
There was a problem hiding this comment.
I think the disposal of the logger is currently being done in all the right places. I was wondering whether it would be clearer and safer to make LocalQueryRun implement Disposable. I decided that I don't think it matters much. It would make some things more consistent but we'd hit a blocker in debugger-ui.ts and ultimately I'm not sure it brings any extra safety.
So overall I don't think anything needs to change. I just wanted to post my thoughts on it 🤷🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches the
TeeLoggerfrom using theappendFilefunction to manually opening and closing a file handle and callingappendFileon the file handle. This results in a more efficient implementation as the file handle is only opened once and closed once, instead of being opened and closed for every log message. This should result in less "too many open files" errors.Checklist
ready-for-doc-reviewlabel there.