Skip to content

More multi-threading

Paal Kvamme requested to merge kvamme62/threads into master

For cloud storage: Add multi-threading when reading chunks (I/O bound tasks) and in the decompress / copy-out stage (CPU bound tasks). The CPU bound tasks will in the typical case distribute the workload across more threads than the I/O does.

For local storage on Windows machines: Add multi-threading in the decompress / copy-out stage.

For local storage on Windows machines: No change as this case already did multi-threading.

Also did some refactoring to change the internal ReadRequest::delivery_t type to deliver a smart pointer. Propagate that change to a number of other places that will now also use smart pointers. This will in some cases mean less copying of data. It also adds robustness to the code a few places. The refactoring does not affect the public API.

The refactoring was done in multiple very small steps to make it easier to verify. Looking at just the commit history this makes it seem like a major undertaking. But it isn't that bad.

Updated the document describing multi-threading and converted it from html to markdown.

Merge request reports

Loading