optimized graph loading