Log4cxx
  1. Log4cxx
  2. LOGCXX-58

ImmediateFlush'd FileAppenders extremely slow on Windows

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None

      Description

      Early APR-based versions of FileAppender (1.13-1.19) called apr_file_flush() after each log request if immediateFlush was set to true. On Unix platforms, the call is a no-op on unbuffered files, however on Windows it is a call to FileFlushBuffers which can be extraordinarily expensive. So much so that the affected benchmarks were 100x slower on Windows than Linux.

      I logged the issue as an APR bug (http://issues.apache.org/bugzilla/show_bug.cgi?id=33485) and have removed the call to apr_file_flush in the FileAppender. This in effectively causes the immediateFlush attribute to be ignored.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development