Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increased Websocket frame size from 256 kb to 16 Mb #96

Merged

Conversation

elara-leitstellentechnik

Frame size ist way too small to handle large responses (e.g. lists of peer / device)

@l3nz
Copy link
Collaborator

l3nz commented May 15, 2018

I am dubious about accepting it as it stands as it will allocate a block per request even when you are just expecting a 20-byte payload. Not everybody wants to allocate so much. I would be okay if you made this a user-configurable property, or - better - if there was a way to allocate blocks on demand.
What do you think?

@l3nz
Copy link
Collaborator

l3nz commented May 15, 2018

Actually I'm not sure. It is only used by the Netty HttpObjectAggregator - does it allocate it away in one go, or is it on demand?

@elara-leitstellentechnik
Copy link
Author

I will have a look.

But as far as I found out, this is the only way that netty can handle long responses ...

@elara-leitstellentechnik
Copy link
Author

I followed the variable all its way into the netty stack: it is only used to make sure that content length does not exceed the given value.

Thus, the given value is not used to allocate memory. The allocation happens somewhere else (where this limit is unknown) can only depend on the content length!

@l3nz l3nz merged commit 762b8a6 into ari4java:master May 15, 2018
@l3nz
Copy link
Collaborator

l3nz commented May 15, 2018

In this case, I think we can merge safely. Thank you! 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants