T11627: Improve KIO asynchronicity

Méven Car noreply at phabricator.kde.org
Mon Jan 27 09:05:25 GMT 2020


meven added a comment.


  In T11627#206210 <https://phabricator.kde.org/T11627#206210>, @broulik wrote:
  
  > I'm pretty sure there's a tonne of blocking DBus calls being done all over the place during file copy (checking for slaves on hold, updating kuiserver job tracking info, etc) which can cause apps to hang or slow down if whatever they're trying to call into is busy. Best example: SIGSTOP plasmashell, try copying a file in Dolphin, won't work until plasmashell SIGCONTs.
  
  
  That's interesting, we need to fix that.
  
  About https://bugs.kde.org/show_bug.cgi?id=281270 `Inconsistent notifications during/after file operations (copying, moving, deleting, compressing, extracting) depending on amount of data/items involved` :
  
  A possible way to fix this would probably use sendfile with O_NONBLOCK + select.
  After a non-blocking sendfile we call select/pselect on the dest file descriptor. Then when it returns something other than EWOULDBLOCK, we can deduce the processed bytes from the size sent to copy to dest (i.e sendfile count parameter) or use pselect and its sigset_t parameter. We then can call sendfile again to write next bytes.
  On the plus side it would make the code async which would make progress reporting more reactive.

TASK DETAIL
  https://phabricator.kde.org/T11627

To: meven
Cc: broulik, ognarb, #dolphin, #frameworks, meven, dfaure, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200127/ea53adeb/attachment.htm>


More information about the kfm-devel mailing list