D10702: Always use a job to delete files to avoid freezing process waiting on IO

Mark Gaiser noreply at phabricator.kde.org
Sun Feb 25 18:42:46 UTC 2018


markg added a comment.


  In D10702#213845 <https://phabricator.kde.org/D10702#213845>, @dfaure wrote:
  
  > "unlink() in most of the modern filesystems is not affected by the size of the file" doesn't match my experience, I have seen konqueror/dolphin freeze for 10s while deleting a 8GB file (on a somewhat old system, no SSD). And that would actually be the reason for this patch to go in. But on the other hand, I have a hard time believing that this patch doesn't make things slower for the case of many small files, due to the communication overhead with the kioslave (and that's the reason I wrote this code in the first place).
  >
  > Maybe the right solution is to use QFile::remove if the file is small, and use the kioslave if the file is big. But finding the file size in the first place takes a little bit of time too :-)
  
  
  Note that the issue here is the blocking part which @meven tried to solve :)
  The performance impact this would potentially have is merely the point i happen to notice.
  
  But the blocking issue remains, also with your suggestion of QFile::remove.
  An alternative approach (that does not involve std::async) is to pre-scan the list of files for local files and send them all at once to the kioslave, just as a list of files to be deleted. A downside in that approach would be the requirement to change the slave as well to handle this.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D10702

To: meven, #frameworks, dfaure, ngraham, #dolphin, jtamate
Cc: jtamate, markg, ngraham, #frameworks, michaelh, kmorwinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180225/bec761ea/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list