minor optimizations in graph build while looking into the 8milX case