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

Reply via email to