optimize customer view: avoid looking up config values inside loops, RT#4728