git_handler: use convert_list to cache git objects
getnewgitcommits() does a weird traversal where a particular commit SHA is visited as many times as the number of parents it has, effectively doubling object reads in the standard case with one parent. This patch makes the convert_list a cache for objects, so that a particular Git object is read just once. On a mostly linear repository with over 50,000 commits, this brings a no-op hg pull down from 70 seconds to 38, which is close to half the time, as expected. Note that even a no-op hg pull currently does a full DAG traversal -- an upcoming patch will fix this.
Loading
Please register or sign in to comment