sonatype/nexus — pull request #294 by cstamas (2012-02-10 13:04:09+00:00)
Title: NEXUS-4855: Making registry be lazy about map creation.

https://issues.sonatype.org/browse/NEXUS-4855

The `getRepositoriesMap()` is where all of registry calls boils down. Current implementation was creating a _copy_ of whole registry map per method invocation. This was a huge overhead, especially when the map itself is huge.

Instead, now registry maintains the "repo map" and the "RO view of repo map" in par, and always hands off the same instance, and recreates it only on repo map changes.