Create groups on a separated thread.