mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Changelog.computeDifferences() called ConfigurationMetadataRepository.getAllProperties() from inside its main loop. The default repository implementation builds a new map each time that method is called, so the new version's properties were rebuilt once per property of the old version. The ids that had already been seen were also tracked in an ArrayList, turning each membership check into a linear scan. Read the properties of each repository once and use the old properties map itself to detect the properties that have been added. Computing the changelog between Spring Boot 3.4.0 and 3.5.0 (2,498 and 2,555 properties) drops from 203ms to 0.5ms and the generator's peak memory from 302MB to 91MB. The generated asciidoc is byte for byte identical. See gh-51655 Signed-off-by: Junggi Kim <kimjg2477@gmail.com>