Keep the debug log file open and flush with each message.
Instead of opening and closing the debug log file with each message, keep
it open permanently and flush it with each message, allowing the OS to
flush to disk as needed. With debug logging enabled, performance is improved
by 100x!
Also, dynamically size the output buffer to the max message size. When
running all the samples, the largest debug message was 318 characters so
an initial size of 512 (instead of 32768) seems reasonable.
BUG=angle:575
Change-Id: If4a1387431fc2d32a6b2d1f9ca1f2590473feb86
Reviewed-on: https://chromium-review.googlesource.com/188713Reviewed-by:
Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by:
Shannon Woods <shannonwoods@chromium.org>
Tested-by:
Geoff Lang <geofflang@chromium.org>
Showing
Please
register
or
sign in
to comment