Closed retrooper closed 2 years ago
We might scratch this. Still thinking
Note: As of now, the wrappers have to be instantiated on the netty-threads. (Actually processes/reads the buffer) The data in the wrapper can be read later. Doing this automatically for each packet, would not be ideal. Some packets like outgoing chat message are quite large, and it would be unpleasant to redundantly process it, when it might not even be used.
Regarding this, we could consider storing the buffer for later usage via retainedDuplicate, and once we are done with it, release it. Maybe make a new listener type (probably not), preferable a new setting in listeners, should be off by default as its just extra memory.
This might be tough to do efficiently