Performance improvements related to wm-grid