Restore sendfile support

Authored by davidedmundson on Nov 20 2018, 1:38 PM.



Somehow in the kdelibs -> framework port the cmake checks for

That re-enables a massive optimisation in the file kioslave that has all the code existing and used in kdelibs4 that we're currently missing.

Test Plan

Put a compilation fail inside the #ifdef, before it wasn't triggered, now it is.

Ran unit tests
Moved a file in dolphin

Diff Detail

R241 KIO
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 20 2018, 1:38 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 20 2018, 1:38 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 20 2018, 1:38 PM
davidedmundson edited the summary of this revision. (Show Details)Nov 20 2018, 1:42 PM
apol added a subscriber: apol.Nov 20 2018, 1:49 PM

+1 looks good to me.

Chenge #if defined HAVE_SENDFILE to #if HAVE_SENDFILE though, cmakedefine01 will define it always, if I'm not mistaken.

Does this result in a performance improvement? Anything quantifiable I can blog about?

It should be faster.

It'll go from reading a file into a buffer in userspace and writing it back to it all being handled automagically.

I'm not sure you can really blog about it, the code existed since 2003.

dfaure accepted this revision.Nov 20 2018, 10:04 PM

Nice catch.

... and catching this is the whole reason for #if instead of #ifdef ... too bad this one was still using ifdef (if defined).

This revision is now accepted and ready to land.Nov 20 2018, 10:04 PM
This revision was automatically updated to reflect the committed changes.

Can someone benchmark this? Would be nice to know how much this affects performance.