activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <>
Subject [GitHub] activemq-artemis pull request #2427: ARTEMIS-2170 Optimized CoreMessage's ch...
Date Sun, 11 Nov 2018 18:24:54 GMT
Github user franz1981 commented on a diff in the pull request:
    --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/
    @@ -318,6 +320,33 @@ public synchronized boolean containsProperty(final SimpleString key)
    +   public synchronized boolean cleanupInternalProperties(Predicate<SimpleString>
propertyNamePredicate) {
    +      if (!internalProperties) {
    --- End diff --
    The biggest improvement here is exactly due to the fact that cleaning up properties atomically
is a duty of who own the data ie TypedProperties. 
    About the message particulars I do believe that `TypedProperty` already contains some
of them:
    - internal property name prefix ie `TypedProperties.AMQ_PROPNAME`
    - internal properties presence checks ie `TypedProperties::hasInternalProperties`
    I have used the `Predicate` to allow decoupling, but I understand your point here: we
can move it outer (as it is, algoritmically), but I'm not fully sure that it will bring the
same benefit (eg enter/exit synchronize TypedProperty once).
    Just to give some reason of this change: with this PR it is producing less then 1/4 of
the garbage while having more then twice the throughput.


View raw message