Optimize layers rendering