optimised relation grid layout