Duplication of many files is very slow
Affected Version
- Version: GNOME nautilus 45.rc
- Distribution: Ubuntu 23.10
- Happens with development Flatpak: I don't know. Sorry, I just want to report this bug before going to bed. If I have more time in two weeks and there is no risk to brick my laptop using dev version of Nautilus, I'll try to help further.
Use Cases
Hello, I want to save many webpages in the same folder (a few dozens webpages per day). And the time to save builds up. There may be a performance bug in Firefox, but it may also be in other places.
I found that Nautilus takes a very big time to duplicate files.
- Save https://example.com in a test folder.
- Open the test folder with Nautilus.
- Open a terminal and launch top command to monitor CPU use for the rest of the test.
- In the folder, type
Ctrl-A
,Ctrl-C
,Ctrl-V
12 times. - You will obtain 4096 copies of "Example Domain.html".
The last steps should be very slow.
My laptop is slightly old. If you have a recent laptop, you may need to use 8192 files or 16384 files, but you will hit the same problem than me in the end.
Available Workarounds
Wait more than a minute
Difficulties
It is too slow : 4096 files of 1.2 ko is nothing for current hardware.
Suggested Enhancements
I think there must be some kind of quadratic complexity. The code should do some batch processing instead of duplicating one, refreshing everything, repeat.
Edited by Jeff Fortin