Revision 422c911...

Go back to digest for 1st June 2014

Features in KDE-PIM

Dan Vratil committed changes in [akonadi] /:

Implement direct streaming of part data

This implements a new optimization for item streaming, which improves performance
and memory efficiency when appending or modifying items, but allowing clients to
write the payload directly to a file instead of sending it to the server.

This effectively eliminates the need of transmitting (possibly large, but always
at least DbConfig::sizeTreshold() bytes-large) part data to the server, which has
to process it and write it to a file. This feature of course only works for external
parts, i.e. parts larger than the configured treshold. Smaller parts or non-literals
are still parsed as usually.

The main change that clients have to cope with is that the continuation response
can now contain parseable data that they must check for:

+ STREAM [FILE external_file_name]

If client receives this response, it parses the file name and writes the data
directly into the file instead of sending them to the server. In case of error,
the client replies "* NO Error message", otherwise it just sends next payload part
header, or end of list.

The server only verifies that the file size matches the advertised size of the part
and continues parsing next data.

Clients have to advertise that they support direct payload streaming by listing
DIRECTSTREAMING in CAPABILITY command. Clients without this capability will never
receive the STREAM continuation response and must provide any payload the usualy way.

File Changes

Added 3 files
  •   server/src/storage/partstreamer.cpp
  •   server/src/storage/partstreamer.h
  •   server/tests/unittest/partstreamertest.cpp
Modified 18 files
  •   CMakeLists.txt
  •   libs/protocol_p.h
  •   server/CMakeLists.txt
  •   server/src/clientcapabilities.cpp
  •   server/src/clientcapabilities.h
  •   server/src/connection.cpp
  •   server/src/imapstreamparser.cpp
  •   server/src/imapstreamparser.h
  •   server/src/handler/akappend.cpp
  •   server/src/handler/capability.cpp
  •   server/src/handler/capability.h
  •   server/src/handler/merge.cpp
  •   server/src/handler/store.cpp
  •   server/src/storage/parthelper.cpp
  •   server/src/storage/parthelper.h
  •   server/tests/unittest/CMakeLists.txt
  •   server/tests/unittest/fakeconnection.cpp
  •   server/tests/unittest/fakeconnection.h
21 files changed in total