-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadratic(?) slowdown on file moves across filesystems #4287
Comments
'perf record / perf report' renders the following:
GDB's backtrace for possible location:
https://people.gnome.org/~ryanl/glib-docs/glib-Singly-Linked-Lists.html warns about 'g_slist_append':
|
Replying to slyfox:
I can propose to replace g_list_append() with g_list_prepend() if order of erase_list items is no matter or reimplement erase_list using GQueue otherwise. |
The patch works for me: 1M files move in ~30 seconds.
Thank you! |
|
|
I believe, that I triggered an issue with the last merged patch as you can see in the attachment.
When moving single files or a list of files, then the move went fine. As soon as you move a directory with no, one or many files then this critical assertion pops up all the time.
May I ask to have a review of the last merged patch ? This issue won't happen with the last official release but happens with mc git. |
Picture ilustrating the issue. |
Important
This issue was migrated from Trac:
slyfox
(@trofi)Tried to move firefox build tree from one btrfs subvolume to another on NVMe device. It contained ~2M files. Normally it should take under a minute to relink a few gigabytes. But mc did not not succeed in 1 hour.
Looks like there is a quadratic behavior in file moves related to single list traversal.
Here is the reproducer:
Expected behavior: operation should take seconds (rougly the same time it takes to create the directory tree).
Actual behaviour: it takes tens of minutes to move the dir.
Script to build a directory:
Run as:
Note
Original attachments:
Axanar
(aliakc@….de) onOct 2, 2021 at 7:12 UTC
The text was updated successfully, but these errors were encountered: