Performance optimizations for rules generation in CSS module