##// END OF EJS Templates
localrepo: micro-optimize __len__() to bypass repoview...
Yuya Nishihara -
r35754:29f57ce4 default
parent child Browse files
Show More
@@ -762,7 +762,9 b' class localrepository(object):'
762 __bool__ = __nonzero__
762 __bool__ = __nonzero__
763
763
764 def __len__(self):
764 def __len__(self):
765 return len(self.changelog)
765 # no need to pay the cost of repoview.changelog
766 unfi = self.unfiltered()
767 return len(unfi.changelog)
766
768
767 def __iter__(self):
769 def __iter__(self):
768 return iter(self.changelog)
770 return iter(self.changelog)
General Comments 0
You need to be logged in to leave comments. Login now