Commit feee44bf9a92c9d36c40fea9a4fb861b0e6d0fc4

Geoff Lang 2014-03-05T11:34:31

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/188713 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>