[Issue 18388] std.experimental.logger slow performance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 6 22:29:20 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18388

--- Comment #9 from Arun Chandrasekaran <aruncxy at gmail.com> ---
> You need to flush after each log call. If there is a log buffer and the program crashes, you might not see the log line that indicates the problem

That's right, but may be worth doing on a configuration basis (async mode)?
Also I'm not sure how formattedWrite is implemented. As I see it writes piece
by piece into the LockingWriter.

The log string could probably be constructed first, followed by a single write
into the sink. This will avoid multiple chunked writes.

--


More information about the Digitalmars-d-bugs mailing list