Optimize layout resources