Bug 60961

Summary: ViewResultsTree: Selection gets lost after refresh (nightly)
Product: JMeter - Now in Github Reporter: andreaslind01
Component: MainAssignee: JMeter issues mailing list <issues>
Status: CLOSED FIXED    
Severity: blocker CC: p.mouawad
Priority: P2    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on: 60687    
Bug Blocks:    
Attachments: Keep selection on refresh
Keep selection and expanded state on refresh
Render the displayed sampler result less often

Description andreaslind01 2017-04-06 14:20:25 UTC
(JMeter 3.2 rc2)
I have a testplan containing a ViewResultsTree listener and a ThreadGroup with HTTPRequests.
When I run the testplan and select an item in the results tree, this selection gets lost as soon as new items show up.
Comment 1 Philippe Mouawad 2017-04-06 14:25:20 UTC
(In reply to logox01 from comment #0)
> (JMeter 3.2 rc2)
> I have a testplan containing a ViewResultsTree listener and a ThreadGroup
> with HTTPRequests.
> When I run the testplan and select an item in the results tree, this
> selection gets lost as soon as new items show up.

Hello,
I am not sure we can do anything about that without a performance tradeoff.

The idea of recent changes are to allow Load Testing without freezing JMeter.
It is an ANTI-PATTERN but unfortunately a lot of users still do it and this tends to impact negatively JMeter reputation.
Comment 2 Felix Schumacher 2017-07-15 14:30:29 UTC
Created attachment 35142 [details]
Keep selection on refresh

This is a first try to keep the selection on refreshing the view.

It is missing to keep the expanded unselected sub-tree of a selected node.
Comment 3 Felix Schumacher 2017-07-16 11:22:19 UTC
Created attachment 35143 [details]
Keep selection and expanded state on refresh

This patch keeps the state of selected and expanded elements.
Comment 4 Felix Schumacher 2017-07-16 15:57:40 UTC
This will be included in version 3.3

@logox01 it would be nice, if you could test the next nightly and report if it fixes your use case.

Date: Sun Jul 16 15:55:58 2017
New Revision: 1802075

URL: http://svn.apache.org/viewvc?rev=1802075&view=rev
Log:
Try to keep status of selected and expanded elements in View Results Tree when new elements are added.

Bugzilla Id: 60961

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
    jmeter/trunk/xdocs/changes.xml
Comment 5 andreaslind01 2017-07-19 14:21:52 UTC
Hello,

I have successfully retested the issue with the latest jmeter nightly (r1802306) - everything is working as expected.

Thanks for fixing the issue.
Comment 6 andreaslind01 2017-07-24 11:51:16 UTC
I retested the latest nightly and found out, that this change leads to a massive performance impact, because the rendering for the selected item is done after every refresh of the results tree.

Eg, if you select a http sample and view the response as html while the test is running, the html rendering is done again after every refresh of the results tree (jmeter.gui.refresh_period).
Comment 7 Felix Schumacher 2017-07-25 10:35:32 UTC
Created attachment 35170 [details]
Render the displayed sampler result less often

It would be nice, if the interface ResultRenderer could have been asked for the currently rendered Object, but this will do probably just fine.
Comment 8 Felix Schumacher 2017-07-25 17:16:21 UTC
Thanks again for the feedback. Could you re-test the next nightly, if the performance problem is really gone with the fix?

Date: Tue Jul 25 17:10:55 2017
New Revision: 1802981

URL: http://svn.apache.org/viewvc?rev=1802981&view=rev
Log:
Render the displayed sampler result less often

Bugzilla Id: 60961

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
Comment 9 andreaslind01 2017-07-27 07:15:15 UTC
I have successfully re-tested the latest nightly (r1803103).
The performance problem is gone (rendering is now done the first time only).

Thanks for fixing.
Comment 10 The ASF infrastructure team 2022-09-24 20:38:08 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4356