extract locals into computeGraphHeight method