Optimum would be before the hive swarms and they can handle the loss of brood and bees and still be efficient honey producers for you. You also have to do it early enough in the year so the split can reach full population for gathering stores for winter. You can make the split early and make it small, or make it late and make it large.