~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_osutils.py

  • Committer: Robert Collins
  • Date: 2006-06-09 15:34:26 UTC
  • mto: This revision was merged to the branch mainline in revision 3682.
  • Revision ID: robertc@robertcollins.net-20060609153426-803129580b26d89f
Add a replacement for os.listdir which returns file kind information from readdir when it is available. This drops our osutils.walkdirs time further, down to 77ms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        self.make_kernel_like_tree()
28
28
        # on roberts machine: this originally took:  157ms/4177ms
29
29
        # plain os.walk takes 213ms on this tree
 
30
        # with the pyrex readdir module:              77ms/5423ms
30
31
        def dowalk():
31
32
            for dirblock in osutils.walkdirs('.'):
32
33
                if dirblock[0][1] == '.bzr':