~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

Streamline _walkdirs_utf8 for utf8 file systems, reducing time to traverse a mozilla tree from 1s to .6 seconds. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
 
29
29
def profile(f, *args, **kwds):
30
 
    """XXX docstring"""
 
30
    """Run a function profile.
 
31
    
 
32
    :return: The functions return value and a stats object.
 
33
    """
31
34
    global _g_threadmap
32
35
    p = Profiler()
33
36
    p.enable(subcalls=True)