<table><tr><td style="">fvogt edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-fzhbfr5uni43xah/">(Show Details)</a><br />fvogt edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-mlo2ttcb4nxbn74/">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15426">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">I<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">f m_data contains a relatively large amount of data, calls to readData are<br />
really expensive as i</span>t copies the remaining data <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">to the beginning of the buffer,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">around in memory.<br />
<br />
For some reason, readAll() on an AccessManagerReply results in calls to<br />
readData with a maxSize of 16384 until it returns 0.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">which can be</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">That's pretty much the</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">really</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">worst case scenario, but also the most likely used one.<br />
<br />
Avoid the</span> expens<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ive.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">ive remove operation by only calling remove if it saves</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">BUG: 375765</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">sufficient memory.<br />
<br />
Additionally, bail out if maxSize is < 0.</span></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Only build tested</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Ran accessmanagertest, passes.<br />
Downloaded files with kio-gdrive, not stuck in memmove anymore.<br />
It still dies for very large files</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">please test with</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">but that's a design issue in</span> kio-gdriv<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">e</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">e<br />
which can't be addressed in KIO</span>.</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15426">https://phabricator.kde.org/D15426</a></div></div><br /><div><strong>To: </strong>fvogt, Frameworks, elvisangelaccio<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>