Better perf by caching branch list