[JBoss JIRA] (JGRP-2048) ClassConfigurator: use constructors rather than Classes in map
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2048?page=com.atlassian.jira.plugin.... ]
Bela Ban resolved JGRP-2048.
----------------------------
Resolution: Duplicate Issue
JGRP-2043 uses lambdas ({{Supplier<Header>}}) as values of the classMap hashmap. This is faster than storing {{MethodHandles}}.
> ClassConfigurator: use constructors rather than Classes in map
> --------------------------------------------------------------
>
> Key: JGRP-2048
> URL: https://issues.jboss.org/browse/JGRP-2048
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 4.0
>
>
> Investigate whether use of {{Constructor}} as values in the maps rather than {{Class<?>}} improves performance. {{Class.newInstance()}} does cache the constructor, but there's a security check that's executed once, so using the constructor may improve perf.
> Also, if a class doesn't have an empty constructor, using {{Class.newInstance()}} would throw an exception, whereas using constructors would detect this at load time.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months
[JBoss JIRA] (JGRP-2048) ClassConfigurator: use constructors rather than Classes in map
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2048?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-2048:
--------------------------------
Duplicate of JGRP-2043
> ClassConfigurator: use constructors rather than Classes in map
> --------------------------------------------------------------
>
> Key: JGRP-2048
> URL: https://issues.jboss.org/browse/JGRP-2048
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 4.0
>
>
> Investigate whether use of {{Constructor}} as values in the maps rather than {{Class<?>}} improves performance. {{Class.newInstance()}} does cache the constructor, but there's a security check that's executed once, so using the constructor may improve perf.
> Also, if a class doesn't have an empty constructor, using {{Class.newInstance()}} would throw an exception, whereas using constructors would detect this at load time.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months
[JBoss JIRA] (JGRP-2042) Improve performance of Message#writeHeader
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2042?page=com.atlassian.jira.plugin.... ]
Bela Ban resolved JGRP-2042.
----------------------------
Resolution: Done
> 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)
8 years, 6 months
[JBoss JIRA] (JGRP-2042) Improve performance of Message#writeHeader
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2042?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-2042:
--------------------------------
The solution picked was to add IDs to all {{Header}} subclasses and sanity check them against {{jg-magic-map.xml}}. When serializing a header instance, instead of getting the magic-ID via hashmap lookup, {{Header.getMagicId()}} is called instead. This avoids a hashmap lookup per header when serializaing a message. We have usually 3-4 headers per message, so 3-4 lookups per message we don't have to perform.
> 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)
8 years, 6 months
[JBoss JIRA] (JGRP-2042) Improve performance of Message#writeHeader
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2042?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-2042:
---------------------------
Fix Version/s: (was: 3.6.11)
Quite a few changes; don't want to de-stabilize the 3.6 branch.
> 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)
8 years, 6 months
[JBoss JIRA] (WFCORE-1654) Enhancements for set/unset test suite
by Martin Schvarcbacher (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1654?page=com.atlassian.jira.plugi... ]
Martin Schvarcbacher moved JBEAP-5208 to WFCORE-1654:
-----------------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-1654 (was: JBEAP-5208)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Test Suite
(was: Test Suite)
Affects Version/s: (was: 7.0.0.GA)
> Enhancements for set/unset test suite
> -------------------------------------
>
> Key: WFCORE-1654
> URL: https://issues.jboss.org/browse/WFCORE-1654
> Project: WildFly Core
> Issue Type: Task
> Components: Test Suite
> Reporter: Martin Schvarcbacher
> Assignee: Martin Schvarcbacher
> Priority: Minor
>
> Added tests for jboss-cli ‘set’ and ‘unset’ commands
> Use cases:
> set variable1=value
> set variable2=$variable1
> unset variable1
> set #prints all set variables
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months
[JBoss JIRA] (WFCORE-1653) Enhancements for set/unset testsuite
by Martin Schvarcbacher (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1653?page=com.atlassian.jira.plugi... ]
Martin Schvarcbacher moved JBEAP-5207 to WFCORE-1653:
-----------------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-1653 (was: JBEAP-5207)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Test Suite
(was: Test Suite)
Target Release: (was: 7.1.0.GA)
Affects Version/s: (was: 7.0.0.GA)
> Enhancements for set/unset testsuite
> ------------------------------------
>
> Key: WFCORE-1653
> URL: https://issues.jboss.org/browse/WFCORE-1653
> Project: WildFly Core
> Issue Type: Task
> Components: Test Suite
> Reporter: Martin Schvarcbacher
> Assignee: Martin Schvarcbacher
> Priority: Minor
>
> Added tests for jboss-cli ‘set’ and ‘unset’ commands
> Use cases:
> set variable1=value
> set variable2=$variable1
> unset variable1
> set #prints all set variables
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months