-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Large request problem #6359
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
base: master
Are you sure you want to change the base?
Large request problem #6359
Conversation
|
You saved my day Then, everything is OK, no more waits From the above settings, I cannot tell which one helps |
|
Hi Felix 😄 I feel this is the exact solution for my problem too ! So I downloaded latest valid 6.0.0 snapshot but I feel your modification was not merged yet. I don't have any build env ATM, do you know if I can download jmeter binaries >= 5.6.3 with your fix somewhere ? |
| // Default limited to 110K | ||
| private static final int MAX_LINE_SIZE = | ||
| JMeterUtils.getPropDefault("view.results.tree.max_line_size", 110_000); // $NON-NLS-1$ | ||
|
|
||
| // Limit the soft wrap to 100K (hard limit divided by 1.1) | ||
| private static final int SOFT_WRAP_LINE_SIZE = | ||
| JMeterUtils.getPropDefault("view.results.tree.soft_wrap_line_size", (int) (MAX_LINE_SIZE / 1.1f)); // $NON-NLS-1$ |
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.
Why duplicating the properties? I guess those properties are not needed here
|
|
||
| @Override | ||
| public void setText(String t) { | ||
| super.setText(wrapLongLines(t)); |
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.
WDYT of org.apache.jmeter.visualizers.ViewResultsFullVisualizer.wrapLongLines(t)?
It might make sense moving wrapLongLines to a different class.
| // Try adding the next line if it does not exceed maxWrap | ||
| int next = nextLineSeparator; | ||
| if (next != -1 && pos - next <= maxWrap) { | ||
| if (next != -1 && next - pos <= maxWrap) { |
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.
Do we have a test to cover the change?
Description
Should fix large responses/requests in ViewResultRreader when no linebreaks can be found
Motivation and Context
As described in #6336 JMeter seems to crash, when large request bodies are used in HTTP sampler. This is caused by the used TextArea, which tries to find a good place for breaking and uses too much CPU for this.
One fix, we tried earlier, was to add linebreaks, when large responses are shown. We forgot about requests.
This fix is basically two fixes.
If this fix seems to help, we could remove the usage of StringWrap in the old places.
How Has This Been Tested?
Used a simple test plan, that generates a HTTP body with
${__groovy("abc" * 1_000_000)}. Without this patch, JMeter seems to be crashed. With the fix, it will be responsive (after a short while).Screenshots (if appropriate):
Types of changes
This will insert linebreaks in large data chunks that are displayed with JSyntaxTextArea
Checklist: