We present an amelioration of current known algorithms for optimal spectral partitioning problems. The idea is to use the advantage of a representation using density functions while decreasing the computational time. This is done by restricting the computation to neighbourhoods of regions where the associated densities are above a certain threshold. The algorithm extends and improves known methods in the plane and on surfaces in dimension 3. It also makes possible to make some of the first computations of volumic 3D spectral partitions on sufficiently large discretizations.