Copying files is slow and slows to a crawl over time for large numbers of files [$200]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Files |
Confirmed
|
High
|
Unassigned |
Bug Description
Copying a lot of files via Pantheon Files becomes slower and slower over time.
I've created 250,000 100-byte files on tmpfs for testing, and kicked off copying to another tmpfs. It started off at speeds over 100Kb/s but halfway through it's just 4Kb/s (!) and dropping.
Profiling with sysprof shows that all this time is spent in g_list_last(), which probably means that we're abusing a linked list somewhere and that it has to walk the entire list of already copied files, one by one, for each next file copied.
Testcase:
mkdir ~/created-files ~/copy-here
sudo mount -t tmpfs -o size=1G,mode=0777 tmpfs ~/created-files
sudo mount -t tmpfs -o size=1G,mode=0777 tmpfs ~/copy-here
cd created-files
split -b 100 SOME-BIG-FILE
# open Pantheon Files and copy "created-files" folder into "copy-here"
This is a synthetic test case, but I had over 250,000 files during my last backup for OS reinstallation, so this *is* a real-life scenario.
ProblemType: Bug
DistroRelease: elementary OS 0.3
Package: pantheon-files 0.1.5.1+
ProcVersionSign
Uname: Linux 3.13.0-43-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CrashDB: pantheon_files
CurrentDesktop: Pantheon
Date: Sun Dec 21 04:42:10 2014
ExecutablePath: /usr/bin/
GsettingsChanges:
InstallationDate: Installed on 2014-12-10 (10 days ago)
InstallationMedia: elementary OS 0.3 "Freya" - Daily amd64 (20141209)
SourcePackage: pantheon-files
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Jeremy Wootten: Approve
-
Diff: 66 lines (+14/-9)1 file modifiedlibcore/marlin-undostack-manager.c (+14/-9)
Changed in pantheon-files: | |
importance: | Undecided → High |
Changed in pantheon-files: | |
assignee: | nobody → cmm2 (cmm2) |
milestone: | none → freya-rc1 |
description: | updated |
Changed in pantheon-files: | |
status: | Confirmed → In Progress |
summary: |
- Copying a lot of files slows to a crawl over time [$100] + Copying files is slow and slows to a crawl over time for large numbers + of files [$100] |
Changed in pantheon-files: | |
status: | In Progress → Confirmed |
assignee: | cmm2 (cmm2) → nobody |
milestone: | freya-rc1 → none |
summary: |
Copying files is slow and slows to a crawl over time for large numbers - of files [$100] + of files [$200] |
Changed in pantheon-files: | |
status: | Confirmed → Fix Committed |
Changed in pantheon-files: | |
milestone: | none → freya-rc1 |
Changed in pantheon-files: | |
status: | Fix Committed → Confirmed |
Changed in pantheon-files: | |
milestone: | none → loki-beta1 |
Changed in pantheon-files: | |
milestone: | loki-beta1 → loki+1-beta1 |
tags: | added: bounty |
Replacing GList with GSequence data structure might be a way to hotfix this without changing huge amounts of code.