huge optimization in drawing