Clean up CreateFile loop in ReadUTF8File #11753
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Area-Settings
Issues related to settings and customizability, for console or terminal
Issue-Task
It's a feature request, but it doesn't really need a major design.
Product-Terminal
The new Windows Terminal.
Milestone
ReadUTF8File
in the Settings library tries three times to read the settings file. If the size changes while it is being read, it'll try again.Right now, the code looks like this (roughly):
It's expensive to open the file and check the permissions every time. Instead, we could:
That'll save us closing/reopening the file up to three times.
The text was updated successfully, but these errors were encountered: