You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/11/13 07:00:56 UTC
[GitHub] [activemq-artemis] franz1981 commented on pull request #3334: ARTEMIS-2984 Compressed large messages can leak native resources
franz1981 commented on pull request #3334:
URL: https://github.com/apache/activemq-artemis/pull/3334#issuecomment-726563545
@clebertsuconic I'm reworking on this to save users to break their expectations but I see some interesting things that could improve large message streaming, see:
```java
private byte getByte(final long index) {
checkForPacket(index);
if (fileCache != null && index < packetPosition) {
return fileCache.getByteFromCache(index);
} else {
return currentPacket.getChunk()[(int) (index - packetPosition)];
}
}
```
This method is the only one using `FileCache`, part of the `ActiveMQBuffer` API on large messages, that's internal.
Large message streaming is slowed down (and get some additional memory footprint increase too) by the `FileCache` presence, because it needs to save each incoming chunk into it as well, but if users won't read it it's just useless work...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org