RemoteRepository.get_graph().heads(...) repeatedly queries ghosts

Bug #334172 reported by Andrew Bennetts
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

remote_repo.lock_write(); remote_repo.get_graph().heads(...) repeatedly queries any ghosts it encounters, because RemoteRepository's _unstacked_provider never caches missing results. Although not caching misses is good so as to be safe in the general case, for the duration of a heads() call no new keys are going to appear in the remote repository, so repeatedly querying for them is a waste of time.

This shows up in "case 4" of http://bazaar-vcs.org/SmartPushAnalysis1.13; because the divergence check — which is implemented client-side using heads() — encounters <email address hidden> and <email address hidden>, which are ghosts.

Martin Pool (mbp)
tags: added: ghost performance
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.