Abstract— In this paper we show how to optimize the computational cost and maximize consistency in EKF-based SLAM for large environments. We combine Local Mapping with Map Joining in a way that the total cost of computing the final map is minimized compared to full global EKF-SLAM. This solution is not now only shown to be (1) computationally optimal, but in addition, it is empirically shown that (2) it also produces the most consistent environment map. For a given environment size and sensor range, we can determine the optimal size of the local maps required to minimize the total computational cost and maximize map consistency. The motivation of this work is described in a map building experiment in our lab, and the statistical significance of the proposed method is validated using Monte Carlo simulations.