[jboss-jira] [JBoss JIRA] (JGRP-2042) Improve performance of Message#writeHeader

Bela Ban (JIRA) issues at jboss.org
Fri Jul 15 08:51:00 EDT 2016


    [ https://issues.jboss.org/browse/JGRP-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266233#comment-13266233 ] 

Bela Ban commented on JGRP-2042:
--------------------------------

This has not been backported to 3.6 though, so you'd have to change Infinispan to use 4.0... I will port Infinispan to use 4.0 in a few weeks and run benchmarks then.

> Improve performance of Message#writeHeader
> ------------------------------------------
>
>                 Key: JGRP-2042
>                 URL: https://issues.jboss.org/browse/JGRP-2042
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Sanne Grinovero
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 4.0
>
>
> The following stacktrace, taken with JFR, is highlighting a CPU consumer which could be optimised.
> {noformat}Stack Trace	Sample Count	Percentage(%)
> java.util.IdentityHashMap.get(Object)	66	2.224
>    org.jgroups.conf.ClassConfigurator.getMagicNumber(Class)	66	2.224
>       org.jgroups.Message.writeHeader(Header, DataOutput)	66	2.224
> {noformat}
> One idea could be to use an ad-hoc implementation of Map which takes advantage of the key being a {{Class}}. An interesting alternative would be to avoid the map lookup altogether, by having the Header expose a method like "writeMagicNumber(DataInput to)".



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list