You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/02/10 09:20:41 UTC

DO NOT REPLY [Bug 33485] New: - apr_file_flush on unbuffered files vastly more expensive on Windows

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33485>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33485

           Summary: apr_file_flush on unbuffered files vastly more expensive
                    on Windows
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: carnold@apache.org


Calling apr_file_flush on an unbuffered file is a no-op in the Unix and OS/2
implementations, however on Windows it is a call to FileFlushBuffers which can
be an incredibly expensive call.  I ran into this when the Windows build of
log4cxx was 100-fold slower when writing to file than the Linux build.

I've worked around the problem in log4cxx, however this seems like a landmine to
catch unsuspecting developers.  

As it currently stands, apr_file_flush on Win32 leaves the buffered and
unbuffered files in different states.  If buffered, it flushes the APR
maintained buffer but doesn't flush the OS buffer by calling FileFlushBuffers.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org