Contexts grid compacting