You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It calls internalBuffer.capacity(...) for each message append in the batch. Internally, it probably uses an allocation and a memcopy. It should try to anticipate more events to come.
For example, ArrayList uses:
int newCapacity = oldCapacity + (oldCapacity >> 1);
Or it could be smarter and try to guess a possible maximum size.
The text was updated successfully, but these errors were encountered:
I also encountered this problem, I used Filebeat to collect log data, and then sent to Logstash, each time sending 2048 messages, a total of 100MB size, logstash-input-beats will reallocated 2048 times, which will lead to more and more time-consuming.
See
logstash-input-beats/src/main/java/org/logstash/beats/V2Batch.java
Line 84 in 5813c67
It calls internalBuffer.capacity(...) for each message append in the batch. Internally, it probably uses an allocation and a memcopy. It should try to anticipate more events to come.
For example, ArrayList uses:
int newCapacity = oldCapacity + (oldCapacity >> 1);
Or it could be smarter and try to guess a possible maximum size.
The text was updated successfully, but these errors were encountered: