-
Improvement
-
Resolution: Done
-
Medium
-
Oxygen SR3
-
None
-
None
I'm looking at a Java Flight Recording obtained from (internal) scale lab testing, based on Oxygen SR3 code, and see extensive "TLAB Allocations" related to an excessive HashMap.resize() from IdentifiableItemCodec.serialize().
Wondering if perhaps we could improve this by pre-allocating correctly sized Map?
HashMap$Node[] java.util.HashMap.resize() 7552 Object java.util.HashMap.putVal(int, Object, Object, boolean, boolean) 7552 Object java.util.HashMap.put(Object, Object) 7366 YangInstanceIdentifier$NodeIdentifierWithPredicates org.opendaylight.mdsal.binding.dom.codec.impl.IdentifiableItemCodec.serialize(InstanceIdentifier$IdentifiableItem) 2842 Object org.opendaylight.mdsal.binding.dom.codec.impl.IdentifiableItemCodec.serialize(Object) 2842 void org.opendaylight.mdsal.binding.dom.codec.impl.KeyedListNodeCodecContext.addYangPathArgument(InstanceIdentifier$PathArgument, List) 1699 DataContainerCodecContext org.opendaylight.mdsal.binding.dom.codec.impl.DataObjectCodecContext.bindingPathArgumentChild(InstanceIdentifier$PathArgument, List) 1699 DataContainerCodecContext org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext.getCodecContextNode(InstanceIdentifier, List) 1699 Map$Entry org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext.newWriter(InstanceIdentifier, NormalizedNodeStreamWriter) 1692 Map$Entry org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry.toNormalizedNode(InstanceIdentifier, DataObject) 1692 Map$Entry org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalizedNode(InstanceIdentifier, DataObject) 1692 void org.opendaylight.controller.md.sal.binding.impl.AbstractWriteTransaction.put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean) 1692 void org.opendaylight.openflowplugin.common.txchain.TransactionChainManager.writeToTransaction(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean) 1692 void org.opendaylight.openflowplugin.impl.device.DeviceContextImpl.writeToTransaction(LogicalDatastoreType, InstanceIdentifier, DataObject) 1692 Void org.opendaylight.openflowplugin.impl.statistics.StatisticsGatheringUtils.lambda$deleteAllKnownFlows$6(InstanceIdentifier, TxFacade, Optional) 1145 Object org.opendaylight.openflowplugin.impl.statistics.StatisticsGatheringUtils$$Lambda$1924.1642152062.apply(Object) 1145 Object com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(Function, Object) 1145 Object com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(Object, Object) 1145 void com.google.common.util.concurrent.AbstractTransformFuture.run() 1145 void com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(Runnable) 1145 void com.google.common.util.concurrent.AbstractFuture.executeListener(Runnable, Executor) 1145 void com.google.common.util.concurrent.AbstractFuture.addListener(Runnable, Executor) 1145 void com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(Runnable, Executor) 1145 ListenableFuture com.google.common.util.concurrent.AbstractTransformFuture.create(ListenableFuture, Function, Executor) 1145 ListenableFuture com.google.common.util.concurrent.Futures.transform(ListenableFuture, Function, Executor) 1145 void org.opendaylight.openflowplugin.impl.statistics.StatisticsGatheringUtils.deleteAllKnownFlows(TxFacade, InstanceIdentifier, DeviceFlowRegistry) 1145 void org.opendaylight.openflowplugin.impl.services.AbstractMultipartRequestOnTheFlyCallback.startCollecting() 1145 void org.opendaylight.openflowplugin.impl.services.AbstractMultipartRequestOnTheFlyCallback.onSuccess(OfHeader) 1145 void org.opendaylight.openflowplugin.impl.services.AbstractMultipartRequestOnTheFlyCallback.onSuccess(Object) 1145 boolean org.opendaylight.openflowjava.protocol.impl.core.connection.OutboundQueueEntry.complete(OfHeader) 1145 boolean org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment.completeEntry(OutboundQueueEntry, OfHeader) 1145 OutboundQueueEntry org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment.pairRequest(OfHeader) 1145 boolean org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractStackedOutboundQueue.pairRequest(OfHeader) 1145 boolean org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager.onMessage(OfHeader) 1145 void org.opendaylight.openflowjava.protocol.impl.core.connection.ConnectionAdapterImpl.consumeDeviceMessage(DataObject) 1145 void org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractConnectionAdapterStatistics.consume(DataObject) 1145 void org.opendaylight.openflowjava.protocol.impl.core.connection.ConnectionAdapterImpl.consume(DataObject) 1145 void org.opendaylight.openflowjava.protocol.impl.core.DelegatingInboundHandler.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145 ChannelHandlerContext io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) 1145 void io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelHandlerContext, Object) 1145 void org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145 ChannelHandlerContext io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) 1145 void io.netty.handler.codec.MessageToMessageDecoder.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145 ChannelHandlerContext io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) 1145 void io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ChannelHandlerContext, CodecOutputList, int) 1145 void io.netty.handler.codec.ByteToMessageDecoder.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145 ChannelHandlerContext io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) 1145 void io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ChannelHandlerContext, CodecOutputList, int) 1145 void io.netty.handler.codec.ByteToMessageDecoder.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145 ChannelHandlerContext io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) 1145 void io.netty.handler.timeout.IdleStateHandler.channelRead(ChannelHandlerContext, Object) 1145 void org.opendaylight.openflowjava.protocol.impl.core.IdleHandler.channelRead(ChannelHandlerContext, Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) 1145 void io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) 1145
- relates to
-
YANGTOOLS-917 Allow OffsetMaps to be efficiently instantiated
- Resolved