D27504: WIP: RFC: smb faster copy to local

2020-03-10 Thread Harald Sitter
sitter updated this revision to Diff 77343. sitter added a comment. - rebase - move transfer impls to cpp - new unpop function to make the ring usage more consistent and make sure neither thread can overtake the other - new test for transfer tech. notably simulating imbalance in

D27504: WIP: RFC: smb faster copy to local

2020-03-03 Thread Harald Sitter
sitter updated this revision to Diff 76865. sitter added a comment. - refine code a bit - extend to ::get works same as smbCopyGet. in fact I feel like the two functions should be merged. at their hearts they both could read into QIODevices (QFile/QBuffer(QBA)) - use segment class for

D27504: WIP: RFC: smb faster copy to local

2020-02-24 Thread Harald Sitter
sitter added inline comments. INLINE COMMENTS > hallas wrote in kio_smb_dir.cpp:49 > Yes, you could (and should ;) ) use standard C++ for this, i.e.: > > std::unique_ptr buf; > buf = std::make_unique(segmentSize); we use c++11 so can't use make_unique and QBA seems excessive given the use.

D27504: WIP: RFC: smb faster copy to local

2020-02-19 Thread David Hallas
hallas added inline comments. INLINE COMMENTS > anthonyfieroni wrote in kio_smb_dir.cpp:49 > Segment does not free its memory. Why not use QByteArray or similar with > automatic storage allocation? Yes, you could (and should ;) ) use standard C++ for this, i.e.: std::unique_ptr buf; buf =

D27504: WIP: RFC: smb faster copy to local

2020-02-19 Thread Anthony Fieroni
anthonyfieroni added inline comments. INLINE COMMENTS > kio_smb_dir.cpp:49 > +: segmentSize(static_cast(segmentSize_)) // won't be <0 > +, buf(static_cast(malloc(segmentSize))) > +{ Segment does not free its memory. Why not use QByteArray or similar with automatic storage

D27504: WIP: RFC: smb faster copy to local

2020-02-19 Thread Nathaniel Graham
ngraham added a comment. Yep I'm seeing pretty much double speed here. Amazing. This code is above my pay grade, so I won't try to review it. :) But the patch works as described! REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D27504 To: sitter, ngraham,

D27504: WIP: RFC: smb faster copy to local

2020-02-19 Thread Harald Sitter
sitter added inline comments. INLINE COMMENTS > kio_smb_dir.cpp:88 > +const off_t idealSegmentSize = qMin(fileSize / 50, > +4L * 1024 * 1024 /* 4 MiB */); > +segmentSize = qMax(segmentSize, This may actually be too optimistic. If you

D27504: WIP: RFC: smb faster copy to local

2020-02-19 Thread Harald Sitter
sitter created this revision. sitter added reviewers: ngraham, cfeck. Herald added projects: Dolphin, Frameworks. Herald added subscribers: kfm-devel, kde-frameworks-devel. sitter requested review of this revision. REVISION SUMMARY see https://bugs.kde.org/show_bug.cgi?id=291835#c57 for