read speed improvements for read_branches_on_demand