Efficient Task Grouping Through Samplewise Optimisation Landscape Analysis