Some first speed ups for gradient_configurations
gradient_configuration takes below 10s now