GNOME Bugzilla – Bug 759986
file deletion rate speed is wrong
Last modified: 2017-08-29 14:26:58 UTC
Created attachment 318018 [details] nautilus showing files deleted per second. So after compiling libreoffice, I wanted to delete the source folder using nautilus which usually takes time. Over 309 thousand files. Nautilus was showing that it was deleting an average of 567billion files per second which is not accurate. I have attached a screenshot.
Created attachment 324197 [details] [review] Patch for this problem, without any tests
The offending code is at libnautilus-private/nautilus-file-operations.c, line 1573: the argument to a %d format is (int) transfer_rate + 0.5); instead of (int)(transfer_rate + 0.5)); Related: on the following line, the concatenation results in a space missing between the two concatenated parts — can also be seen on the screenshot. I’m attaching the (trivial) patch as I see it, but without any tests.
Created attachment 324198 [details] [review] Patch for this problem (v2) Sorry, the patch I posted was in reverse. Here’s the proper one.
Review of attachment 324198 [details] [review]: Good catch! Thanks! Do you have commit rights?
No, I don’t. (Frankly, I’ve never succeeded in setting up a GNOME build environment either.)
(In reply to Alex Shpilkin from comment #5) > No, I don’t. Ok I will push them for you. > (Frankly, I’ve never succeeded in setting up a GNOME build > environment either.) We have to fix that :) Did you read wiki.gnome.org/Newcomers? should guide you to set up everything in an easy way.
Review of attachment 324198 [details] [review]: Actually the patch doesn't apply to master, but it should be easy to make the required changes. Would you like to?
Created attachment 324254 [details] [review] Patch for this problem (v3) OK, I was too lazy previously to format it to the Git conventions, but here it is now, against git.gnome.org's master. Feel free to edit the description as needed.
Review of attachment 324254 [details] [review]: The commit message lacks the file that is being modified in the title. Also, it says: " should probably not be concatenated from two different strings" but it's indeed needed, precisely for translations, since we need to separate plural and singular.
Created attachment 324262 [details] [review] Patch for this problem (v4) Right, sorry for the e-mail noise.
Review of attachment 324262 [details] [review]: This looks better now! However I didn't realize before, this patch does two changes in one, it should do one change at a time, if not get's confusing why we needed a change on a line which is no related to the original bug report. Let's not get stuck on that tho. If you want to do it properly, please go on, if not I can commit as it is this time :)
The file deletion rate speed is still wrong for me. But now instead of a very large negative number, it is a very large positive number. Trying to delete 165,000 files says some very large number like 983033343 per second which is incorrect because it takes a few minutes. Nautilus built from https://git.gnome.org/browse/nautilus/log/?h=gnome-3-20 so it has the fix according to the logs.
Same here. Alex - your fix is good, you just need to apply it to another line. Hope you don't mind me jumping on this one, I spotted it when I was looking into something else
Created attachment 326202 [details] [review] file-operations: fix deletion rate The deletion rate shown to the user is wrong, it's coming out as a massive number. An earlier fix corrected the deletion rate used to determine if the message should use the plural. This fix is to make the same change to the value shown to the user.
(In reply to Neil Herald from comment #13) > Hope you don't mind me jumping on this one Sure I don’t. Sorry for the noise for (what should have been) a one-line fix. (I should have figured out why I don’t seem to be able to bootstrap git jhbuild on my platform [x86-64 Arch], but I was too lazy and thus couldn’t actually rebuild Nautilus. :( )
(In reply to Neil Herald from comment #14) > Created attachment 326202 [details] [review] [review] > file-operations: fix deletion rate > > The deletion rate shown to the user is wrong, it's coming out as a > massive number. An earlier fix corrected the deletion rate used to > determine if the message should use the plural. This fix is to make the > same change to the value shown to the user. This fixes it. Thank you!
Review of attachment 326202 [details] [review]: Ugh I overkilled it previously. This looks good, thanks!
Attachment 326202 [details] pushed as fe0a16a - file-operations: fix deletion rate
*** Bug 759703 has been marked as a duplicate of this bug. ***
*** Bug 766529 has been marked as a duplicate of this bug. ***