Optimize Topology Generation