view mercurial/__init__.py @ 23980:c1ce5442453f stable

_adjustlinkrev: reuse ancestors set during rename detection (issue4514) The new linkrev adjustement mechanism makes rename detection very slow, because each file rewalks the ancestor dag. To mitigate the issue in Mercurial 3.3, we introduce a simplistic way to share the ancestors computation for the linkrev validation phase. We can reuse the ancestors in that case because we do not care about sub-branching in the ancestors graph. The cached set will be use to check if the linkrev is valid in the search context. This is the vast majority of the ancestors usage during copies search since the uncached one will only be used when linkrev is invalid, which is hopefully rare.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 30 Jan 2015 16:02:28 +0000
parents 9117c6561b0b
children 4374d819ccd5
line wrap: on
line source