In current implementation of Element class there is a lot of blocks synchronized on children collection.
In Tigase XMPP Server as I remember there was assumption that we should not modify received Packet or Element instance and we need to create copy of received instance to make any changes.
If this is true then we could remove synchronization on children collection in Element class as it is not needed and may introduce penalty during execution as each synchronized blocks requires some time to acquire locks and release them.
In current implementation of Element class there is a lot of blocks synchronized on
children
collection.In Tigase XMPP Server as I remember there was assumption that we should not modify received Packet or Element instance and we need to create copy of received instance to make any changes.
If this is true then we could remove synchronization on
children
collection in Element class as it is not needed and may introduce penalty during execution as eachsynchronized
blocks requires some time to acquire locks and release them.