some optimizations to partition system and spells