[Red Hat JIRA] (JGRP-2503) Extend DataInput & DataOutput to avoid copy of byte[]
by Bela Ban (Jira)
[ https://issues.redhat.com/browse/JGRP-2503?page=com.atlassian.jira.plugin... ]
Bela Ban edited comment on JGRP-2503 at 10/12/20 9:21 AM:
----------------------------------------------------------
Hmm, not sure what you mean here... can you post an example that shows where you'd avoid the byte array copy? If you need to read-ahead, can't you create a byte array of a given size and always reuse it?
was (Author: belaban):
Hmm, not sure what you mean here... can you post an example that shows where you'd avoid the byte array copy?
> Extend DataInput & DataOutput to avoid copy of byte[]
> -----------------------------------------------------
>
> Key: JGRP-2503
> URL: https://issues.redhat.com/browse/JGRP-2503
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 5.0.4
> Reporter: Jingqi Xu
> Assignee: Bela Ban
> Priority: Optional
> Fix For: 5.1
>
>
> "DataInput's void readFully(byte b[])" will cause an extra copy when reading bytes from DataInput. Sometimes business logic needs to read bytes from DataInput first, then process them conditionally(or will not process at all) , is it possible to support ByteBuffer api like:
> public interface XDataInput extends DataInput {
> ByteBuffer readBuffer(int n);
> }
> public interface XDataOutput extends DataOutput {
> void writeBuffer(ByteBuffer value);
> }
> ByteArrayDataInputStream.java
> @Override
> public ByteBuffer readBuffer(int n) {
> ByteBuffer r = wrap(this.buf, this.pos, n); this.pos += n; return r;
> }
> public interface Streamable {
> void writeTo(XDataOutput out) throws IOException;
> void readFrom(XDataInput in) throws IOException, ClassNotFoundException;
> }
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (JGRP-2503) Extend DataInput & DataOutput to avoid copy of byte[]
by Bela Ban (Jira)
[ https://issues.redhat.com/browse/JGRP-2503?page=com.atlassian.jira.plugin... ]
Bela Ban commented on JGRP-2503:
--------------------------------
Hmm, not sure what you mean here... can you post an example that shows where you'd avoid the byte array copy?
> Extend DataInput & DataOutput to avoid copy of byte[]
> -----------------------------------------------------
>
> Key: JGRP-2503
> URL: https://issues.redhat.com/browse/JGRP-2503
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 5.0.4
> Reporter: Jingqi Xu
> Assignee: Bela Ban
> Priority: Optional
>
> "DataInput's void readFully(byte b[])" will cause an extra copy when reading bytes from DataInput. Sometimes business logic needs to read bytes from DataInput first, then process them conditionally(or will not process at all) , is it possible to support ByteBuffer api like:
> public interface XDataInput extends DataInput {
> ByteBuffer readBuffer(int n);
> }
> public interface XDataOutput extends DataOutput {
> void writeBuffer(ByteBuffer value);
> }
> ByteArrayDataInputStream.java
> @Override
> public ByteBuffer readBuffer(int n) {
> ByteBuffer r = wrap(this.buf, this.pos, n); this.pos += n; return r;
> }
> public interface Streamable {
> void writeTo(XDataOutput out) throws IOException;
> void readFrom(XDataInput in) throws IOException, ClassNotFoundException;
> }
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (JGRP-2503) Extend DataInput & DataOutput to avoid copy of byte[]
by Bela Ban (Jira)
[ https://issues.redhat.com/browse/JGRP-2503?page=com.atlassian.jira.plugin... ]
Bela Ban updated JGRP-2503:
---------------------------
Fix Version/s: 5.1
> Extend DataInput & DataOutput to avoid copy of byte[]
> -----------------------------------------------------
>
> Key: JGRP-2503
> URL: https://issues.redhat.com/browse/JGRP-2503
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 5.0.4
> Reporter: Jingqi Xu
> Assignee: Bela Ban
> Priority: Optional
> Fix For: 5.1
>
>
> "DataInput's void readFully(byte b[])" will cause an extra copy when reading bytes from DataInput. Sometimes business logic needs to read bytes from DataInput first, then process them conditionally(or will not process at all) , is it possible to support ByteBuffer api like:
> public interface XDataInput extends DataInput {
> ByteBuffer readBuffer(int n);
> }
> public interface XDataOutput extends DataOutput {
> void writeBuffer(ByteBuffer value);
> }
> ByteArrayDataInputStream.java
> @Override
> public ByteBuffer readBuffer(int n) {
> ByteBuffer r = wrap(this.buf, this.pos, n); this.pos += n; return r;
> }
> public interface Streamable {
> void writeTo(XDataOutput out) throws IOException;
> void readFrom(XDataInput in) throws IOException, ClassNotFoundException;
> }
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (JGRP-2503) Extend DataInput & DataOutput to avoid copy of byte[]
by Bela Ban (Jira)
[ https://issues.redhat.com/browse/JGRP-2503?page=com.atlassian.jira.plugin... ]
Bela Ban updated JGRP-2503:
---------------------------
Comment: was deleted
(was: Related to the byte[] copy in [1]
[1] [https://github.com/belaban/JGroups/blob/master/src/org/jgroups/NioMessage...])
> Extend DataInput & DataOutput to avoid copy of byte[]
> -----------------------------------------------------
>
> Key: JGRP-2503
> URL: https://issues.redhat.com/browse/JGRP-2503
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 5.0.4
> Reporter: Jingqi Xu
> Assignee: Bela Ban
> Priority: Optional
>
> "DataInput's void readFully(byte b[])" will cause an extra copy when reading bytes from DataInput. Sometimes business logic needs to read bytes from DataInput first, then process them conditionally(or will not process at all) , is it possible to support ByteBuffer api like:
> public interface XDataInput extends DataInput {
> ByteBuffer readBuffer(int n);
> }
> public interface XDataOutput extends DataOutput {
> void writeBuffer(ByteBuffer value);
> }
> ByteArrayDataInputStream.java
> @Override
> public ByteBuffer readBuffer(int n) {
> ByteBuffer r = wrap(this.buf, this.pos, n); this.pos += n; return r;
> }
> public interface Streamable {
> void writeTo(XDataOutput out) throws IOException;
> void readFrom(XDataInput in) throws IOException, ClassNotFoundException;
> }
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (DROOLS-5711) [DMN XML] Signavio Profile - MultiInstanceDecisionLogic: MID requirements are not linked
by Matteo Mortari (Jira)
[ https://issues.redhat.com/browse/DROOLS-5711?page=com.atlassian.jira.plug... ]
Matteo Mortari commented on DROOLS-5711:
----------------------------------------
Thank you [~tommyn] !
> [DMN XML] Signavio Profile - MultiInstanceDecisionLogic: MID requirements are not linked
> ----------------------------------------------------------------------------------------
>
> Key: DROOLS-5711
> URL: https://issues.redhat.com/browse/DROOLS-5711
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Reporter: Jonas Beyer
> Assignee: Matteo Mortari
> Priority: Minor
> Attachments: DRG.png, DecisionLogic.PNG
>
>
> h3. Summary:
> When evaluating a decision model that contains a MultiInstanceDecision, the result will often times be {{[null]}}, because the engine will not evaluate the decision dependencies of the MID first, and simply execute the MID with empty inputs instead.
> h3. Details:
> The statement that will cause decisions to consider their requirements during evaluation is missing for MultiInstanceDecisions:
> {code:java}
> compiler.linkRequirements( model, di );{code}
> Inside {{org.kie.dmn.signavio.MultiInstanceDecisionLogic.MultiInstanceDecisionNodeCompiler#compileEvaluator}}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months