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

Méven Car noreply at phabricator.kde.org
Sun Jun 3 15:46:59 BST 2018


meven added a comment.


  Great suggestion Mark !
  
  I am a C++ beginner, I did not consider this neat C++ 14 feature.
  
  This will necessitate a c++ compiler dependency change though.
  Like Kwin did last July https://github.com/KDE/kwin/commit/ea5d611de1bc33869c13c27d75a7827201a5139d
  
  >   That in it's own is slightly different to what the code currently does. Currently it calls slotReport after every 300 files. With this it would call slotReport after every 300ms. I don't think that's much of a problem.
  
  I think a time based update would make more sense to the user.
  
  I think deleteFiles and deleteDirs should both be wrapped in the async function.
  Otherwise, at best we would end up with multiple parallel file deletion which is not preferable (given current filesystems and hardware, we should favor sequential deletion) and at worst the same as today blocking the main thread.
  Or we might need some mutex/buffer to synchronize the unlink syscalls through Qt::remove() between different async deletion functions.
  
  So this plus the added necessary synchronizing code, this might end up a big code change.
  
  I will give a spin.

REPOSITORY
  R241 KIO

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

To: meven, #frameworks, dfaure, ngraham, #dolphin, jtamate
Cc: kde-frameworks-devel, jtamate, markg, ngraham, #frameworks, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180603/a0caaf0a/attachment.htm>


More information about the kfm-devel mailing list