Build: #200 was successful
Job: Run Maven was successful
Code commits
Openfire (master)
-
Guus der Kinderen 1fcc6d07f2faec42c74efe08cc3efcd7aef55294
OF-2498: Optimize OccupantManager#registerActivity
Whenever any occupant sends some kind of stanza, a 'last activity' timestamp is being updated in OccupantManager. This process should be efficient, but has not been.
This commit introduces a lookup by JID for the occupant to be updated. This replaces a strategy where all occupants were iterated over to find the correct item to update.- xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/OccupantManager.java (version 1fcc6d07f2faec42c74efe08cc3efcd7aef55294)
- xmppserver/src/test/java/org/jivesoftware/openfire/muc/spi/OccupantManagerTest.java (version 1fcc6d07f2faec42c74efe08cc3efcd7aef55294)
-
Guus der Kinderen 61983eb33651e576b5040b612cea2c8d28278204
OF-2498: Speed up MUCRoom cache size calculation
To calculate the cache size of a MUC room instance, the pre-existing calculation iterated over all messages that it was maintaining as part of the message history strategy. This is a very resource intensive way of calculating the cache size. This commit replaces this with a hardcoded size that is roughly equal to having 25 messages kept in history. This reduces the occuracy of the calculated value, but improves the calculation time dramatically.- xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java (version 61983eb33651e576b5040b612cea2c8d28278204)
-
Guus der Kinderen 1360aa307d180fe93dde9f0eff90275ffbc72de2
OF-2498: Reduce MUCRole cache size calculations
Whenever a MUCRole instance is being added to a cache, its size is being calculated. This is rather resource intensive.
MUCRole instances are largely immutable: the cache size is unlikely to change a lot. To reduce the amount of recalculations, this change retains the last calculated size for an instance, resetting it only when a change has been applied.- xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRole.java (version 1360aa307d180fe93dde9f0eff90275ffbc72de2)