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
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
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.
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 =
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
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,
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
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