httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33485] New: - apr_file_flush on unbuffered files vastly more expensive on Windows
Date Thu, 10 Feb 2005 08:20:41 GMT
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


Mime
View raw message