An easy phobos i/o bug to fix
Steven Schveighoffer
schveiguy at gmail.com
Wed Jul 29 02:18:44 UTC 2020
On 7/28/20 7:24 PM, starcanopy wrote:
> On Monday, 27 July 2020 at 15:19:44 UTC, Steven Schveighoffer wrote:
>> If anyone is using windows and std.stdio.File.rawWrite, it's insanely
>> slow. And it's an easy fix. See
>> https://issues.dlang.org/show_bug.cgi?id=7033
>>
>> I don't use Windows, so I probably won't get around to fixing this.
>> But ping me if you make a PR, I will review it.
>>
>
> So, upon opening a File, save the mode into a field, and only execute
> the current behavior iff the mode isn't binary?
Almost! I was thinking to store the current mode, and then only change
the mode when needed, including the required flush.
This way, subsequent rawWrite calls are less expensive, even if it was
open originally for text mode.
-Steve
More information about the Digitalmars-d
mailing list