  Convergence in self-consistent-field cycles can be a major computational
bottleneck of density-functional theory calculations. We propose a Resta-like
preconditioning method for full-potential all-electron calculations in the
linearized augmented planewave (LAPW) method to smoothly converge to
self-consistency. We implemented this preconditioner in the exciting code and
apply it to the two semiconducting systems of MoS$_2$ slabs and P-rich GaP(100)
surfaces as well as the metallic system Au(111), containing a sufficiently
large amount of vacuum. Our calculations demonstrate that the implemented
scheme performs reliably as well as more efficiently regardless of system size,
suppressing long-range charge sloshing. While the suitability of this
preconditioning higher for semiconducting systems, the convergence for metals
is only slightly decreased and thus still trustworthy to apply. Furthermore, a
mixing algorithm with the preconditioner shows an improvement over that with
the Kerker preconditioner for the investigated semiconducting systems.
