[Ace-users] [ace-users] pread/pwrite implementation for ACE_HAS_WINNT4 performance
Johnny Willemsen
jwillemsen at remedy.nl
Tue Oct 30 06:16:14 CDT 2007
Hi,
The current code doesn't check for ACE_HAS_WINNT4, so:
To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in
$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM
or in
$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM
in older versions of ACE+TAO. Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness. If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers
to.
Regards,
Johnny Willemsen
Remedy IT
Postbus 101
2650 AC Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl
*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO ***
*** See http://www.theaceorb.nl/en/support.html ***
<daniel.schenk at schiller.ch> wrote in message
news:<1193739147.174354.145830 at 22g2000hsm.googlegroups.com>...
> Hi
>
> in ace\OS_NS_unistd.cpp the ACE_WIN32 implementation of ACE_OS::pread
> uses
> 1. ACE_OS_GUARD to synchronize access
> 2. gets the current file pointer, set it to the desired offset and
> restores it after reading
>
> Both should be unnecessary if ACE_HAS_WINNT4 is defined.
> Because ::ReadFile is used with an OVERLAPPED structure. ::ReadFile
> will set the offset internally, which is passed inside the OVERLAPPED
> structure. Therefore there will be no need for synchronization by
> ACE_OS_GUARD.
> This will mean that the current implementation for ACE_HAS_WINNT4
> unnecessarily calls SetFilePointer 3 times and locks, which will of
> course slow down the performance.
> The same will be true for ACE_OS::pwrite.
>
> Please correct me, if I'm wrong. Otherwise I would appreciate if you
> could change the code.
>
> best regards
>
> Daniel Schenk
>
More information about the Ace-users
mailing list