~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_add.py

Combine the ignore rules into a single regex rather than looping over them
to reduce the threshold where  N^2 behaviour occurs in operations like
status. (Jan Hudec, Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        # 3-4 levels deep. 
28
28
        # we simulate this by three levels of dirs named 0-7, givin 512 dirs,
29
29
        # and 20 files each.
30
 
        # on roberts machine this originally took 25936ms/32244ms
31
 
        # after quick tuning (more needed):       14640ms/19677ms 
 
30
        # on roberts machine this originally took:    25936ms/32244ms
 
31
        # after combining the regexes for is_ignored: 13477ms/17591ms
32
32
        self.run_bzr('init')
33
33
        files = []
34
34
        for outer in range(8):