~jameinel/bzr/2.3-get-parent-map-faster

Viewing all changes in revision 5654.

  • Committer: John Arbash Meinel
  • Date: 2011-09-01 15:00:49 UTC
  • Revision ID: john@arbash-meinel.com-20110901150049-58egom3qzcj9fves
Repository.get_parent_map was doing an inefficient set op.

small_set.difference_update(large_set) is better written as
small_set = small_set.difference(large_set)
The former has to walk *all* of large_set, the latter can switch
and just iterate small_set.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: