Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
Improve get config performance by eliminating temporary references.