Profile os.walk memory usage on _delete_dir_tree

Bug #539659 reported by Natalia Bidart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
Medium
Ubuntu One Foundations+ team

Bug Description

_delete_dir_tree uses os.walk (http://docs.python.org/library/os.html#os.walk) for traverse a directory, we need to profile the memory usage for a large directory.
We should consider using os.listdir instead.

Changed in ubuntuone-client:
assignee: nobody → Ubuntu One Foundations+ team (ubuntuone-foundations+)
importance: Undecided → Medium
tags: added: u1-lucid
tags: added: package
tags: added: chicharra
Revision history for this message
Facundo Batista (facundo) wrote :

We have no problem in this respect, according to the analysis I just did.

I profiled memory (using the attached script) on a os.walk() on the kernel sources, and the worst pike (curve attached) was of 50kB.

The kernel (linux-2.6.32) sources had, at the moment I downloaded it, 1959 directories and 31214 files, with a max depth level of 9, and proved to be a good example for other benchmarks.

Also tested it with a wide but not deep structure (deep 4, width 40, in the script), and a deep but not wide one (deep 40, width 10).

As you can see in both attached curves, worst pike is 11kB in one case, and 55kB in the other. Memory usage grows linearly with tree depth, but let's agree that a tree depth of 40 is a little extreme.

Revision history for this message
Facundo Batista (facundo) wrote :
Revision history for this message
Facundo Batista (facundo) wrote :
Revision history for this message
Facundo Batista (facundo) wrote :
Changed in ubuntuone-client:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.