-
Notifications
You must be signed in to change notification settings - Fork 171
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
Limit output size #108
Limit output size #108
Conversation
…er than just individual node sizes.
private long maxOutputSize; | ||
|
||
public OutputList(long maxOutputSize) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: why the extra line here?
|
||
public void addNode(OutputNode node) { | ||
|
||
if (maxOutputSize > 0 && node.getSize() > maxOutputSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only check the size of this node against the max? What if we're adding a large number of very small nodes? Just pushed a test that shows what I mean.
If this is only intended to limit the size of individual nodes, I think we should change the name of maxOutputSize
to something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed now
Previously I was only checking size as we rendered individual output nodes. This helped prevent any one node from getting too big and short circuiting the render, but it was possible to have output that was too big when adding up the output nodes and rendered blocks.
🍹 |
Adds a configuration option to limit the maximum size of an output node.
@jmagnarelli-hs