Comment 3 for bug 512216

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 512216] Re: bzr-search slows down "bzr up"

Thanks.

Some quick results:
the search.index.combine function is 91% of the time.
it calls:
- copy_posting_lists once (90%)
  which calls:
  - iter_all_entries 1.3M times (20%)
  - add_index_to_pack 155K times (63%)
    which calls:
    - finish 153K times (59%)
      which calls
      - write nodes 153K times (56%)
        which calls NamedTemporaryFile 152K times (21% here and 22% from
        init below)
      - btree init 153K times (22%)

NamedTemporaryFile calls _mkstemp_inner 300K times as a result of this
call pattern (42%)

and _mkstemp_inner calls nt.open the same number of times (38%)

So a big chunk of the time (40%) is simply temporary file management on
your platform.

We may be able to help this by changing bzrlib a bit. Can you perhaps
run your %TEMPDIR% on a ram disk.

-Rob