Unify BufferedFileStreamStrategy seeking #78457
Labels
area-System.IO
good first issue
Issue should be easy to implement, good for first-time contributors
help wanted
[up-for-grabs] Good issue for external contributors
tenet-performance
Performance related issue
Milestone
Today while trying to find an answer to #78390 I've realized that
BufferedFileStreamStrategy
has two different approaches to seeking.Seek
provides a smart way of seeking that tries to avoid losing the buffered data if possible:runtime/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs
Lines 936 to 946 in 031a16a
While
Position
setter is plain simple and always loses the buffered data:runtime/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs
Lines 66 to 77 in 031a16a
Position
should be "smart" too and most likely just delegate the work toSeek
The text was updated successfully, but these errors were encountered: