D29265: Implement buffering in the DataStream class, to improve performance on Windows.

David Faure noreply at phabricator.kde.org
Tue Apr 28 19:49:18 BST 2020


dfaure created this revision.
dfaure added reviewers: dvratil, kfunk.
Herald added a project: KDE PIM.
Herald added a subscriber: kde-pim.
dfaure requested review of this revision.

REVISION SUMMARY
  The internal QWindowsPipeWriter in Qt doesn't do any buffering, so the first 8
  bytes (the tag) were sent first, and the rest only later.
  
  This solution uses an explicit flush() method, while doing the flushing
  in the destructor would have been much more convenient and less
  error-prone, but the flushing can throw an exception, so we need
  to do it inside the try/catch -- and certainly not when the stream
  is deleted because another exception happened. This would all be
  so much simpler without the use of exceptions :-)

TEST PLAN
  all tests pass (on Linux)

REPOSITORY
  R165 Akonadi

BRANCH
  2020_04_implement_buffering_in_DataStream_for_Windows

REVISION DETAIL
  https://phabricator.kde.org/D29265

AFFECTED FILES
  autotests/private/protocoltest.h
  autotests/server/fakeakonadiserver.cpp
  autotests/server/fakeclient.cpp
  autotests/server/fakeclient.h
  src/core/connection.cpp
  src/private/datastream_p.cpp
  src/private/datastream_p_p.h
  src/private/protocol.cpp
  src/private/protocol_p.h
  src/private/protocolgen/cppgenerator.cpp
  src/server/connection.cpp
  src/server/connection.h
  src/server/notificationsubscriber.cpp

To: dfaure, dvratil, kfunk
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200428/8c05f6e2/attachment.html>


More information about the kde-pim mailing list