mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
27.23.2015 9a216edaba16b28f240832cbbb25a5e6b367ac86
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, November 27, 2015 15:23 +0100
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, November 30, 2015 15:27 +0100
commit9a216edaba16b28f240832cbbb25a5e6b367ac86
tree d5a6d3c14fbba61497b69fbfaae53a68de30daa7 tree | zip | gz
parent bb6bb0b50b588cd9c256f20d13413e8158a87999 view | diff
OPENDJ-2476 Purge of file-based changelog is very slow and the changelog size is growing

Monitoring shows generating the cookies makes up for a big part of the processing time.
2 factors make this slow:
* using String.format() which ends up always parsing the same format string
* continuously repeating toString()

Here is how this commit fixes these problems:
* used StringBuilder + Long/Integer.toHexString() + custom padding
* Created several toString(StringBuffer) methods and chained them
3 files modified
118 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/replication/common/CSN.java 59 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/common/MultiDomainServerState.java 24 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/common/ServerState.java 35 ●●●● diff | view | raw | blame | history