graph: decrease memory footprint