vlsi commented on pull request #694:
URL: https://github.com/apache/jmeter/pull/694#issuecomment-1025448091
Thank you for the review and for yet another test case.
my setup: macOS Monterey 12.1, Java 11.0.13.
With Nimbus LaF it is really fast when browsing "view results tree".
However, with DarkLaf, there are multi-second delays switching to longer
texts (~15 which corresponds to 884'736 chars)
It is still usable, so we might want to merge the change and investigate the
slowness with Darklaf later, however, I don't quite understand why Darklaf is
slower since the thread spends time in
`DarkTextUI.getPreferredSize(DarkTextUI.java:223)` which just calls
`super.getPreferredSize(c)`.
It might be the font selected by Darklaf is somehow slower.
I did try using different "hard wrap lengths" (including 80 where all the
lines are fully visible in the UI and there's no horizontal scroll, however, it
did not improve the performance.
Here's a stacktrace:
```
"AWT-EventQueue-0" #21 prio=6 os_prio=31 cpu=69414,09ms elapsed=117,36s
tid=0x000000014f405800 nid=0xd903 runnable [0x0000000291d8f000]
java.lang.Thread.State: RUNNABLE
at sun.font.SunLayoutEngine.shape([email protected]/Native Method)
at
sun.font.SunLayoutEngine.layout([email protected]/SunLayoutEngine.java:198)
at
sun.font.GlyphLayout$EngineRecord.layout([email protected]/GlyphLayout.java:687)
at
sun.font.GlyphLayout.layout([email protected]/GlyphLayout.java:468)
at
sun.font.ExtendedTextSourceLabel.createGV([email protected]/ExtendedTextSourceLabel.java:329)
at
sun.font.ExtendedTextSourceLabel.getGV([email protected]/ExtendedTextSourceLabel.java:315)
at
sun.font.ExtendedTextSourceLabel.createLogicalBounds([email protected]/ExtendedTextSourceLabel.java:225)
at
sun.font.ExtendedTextSourceLabel.getAdvance([email protected]/ExtendedTextSourceLabel.java:134)
at java.awt.font.TextLine.init([email protected]/TextLine.java:281)
at java.awt.font.TextLine.<init>([email protected]/TextLine.java:129)
at
java.awt.font.TextLine.fastCreateTextLine([email protected]/TextLine.java:978)
at
java.awt.font.TextLayout.fastInit([email protected]/TextLayout.java:611)
at
java.awt.font.TextLayout.<init>([email protected]/TextLayout.java:392)
at java.awt.Font.getStringBounds([email protected]/Font.java:2616)
at
sun.swing.SwingUtilities2.getFontCharsWidth([email protected]/SwingUtilities2.java:958)
at
sun.swing.SwingUtilities2.getFontCharWidth([email protected]/SwingUtilities2.java:946)
at
javax.swing.text.Utilities.getTabbedTextOffset([email protected]/Utilities.java:537)
at
javax.swing.text.Utilities.getTabbedTextOffset([email protected]/Utilities.java:466)
at
javax.swing.text.WrappedPlainView.calculateBreakPosition([email protected]/WrappedPlainView.java:366)
at
javax.swing.text.WrappedPlainView$WrappedLine.breakLines([email protected]/WrappedPlainView.java:920)
at
javax.swing.text.WrappedPlainView$WrappedLine.getPreferredSpan([email protected]/WrappedPlainView.java:692)
at
javax.swing.text.BoxView.calculateMajorAxisRequirements([email protected]/BoxView.java:873)
at
javax.swing.text.BoxView.checkRequests([email protected]/BoxView.java:931)
at
javax.swing.text.BoxView.setSpanOnAxis([email protected]/BoxView.java:330)
at
javax.swing.text.BoxView.layout([email protected]/BoxView.java:710)
at
javax.swing.text.BoxView.setSize([email protected]/BoxView.java:398)
at
javax.swing.text.WrappedPlainView.setSize([email protected]/WrappedPlainView.java:519)
at
javax.swing.plaf.basic.BasicTextUI$RootView.setSize([email protected]/BasicTextUI.java:1818)
at
javax.swing.plaf.basic.BasicTextUI.getPreferredSize([email protected]/BasicTextUI.java:948)
at
com.github.weisj.darklaf.ui.text.DarkTextUI.getPreferredSize(DarkTextUI.java:223)
at
javax.swing.JComponent.getPreferredSize([email protected]/JComponent.java:1680)
at
javax.swing.JEditorPane.getPreferredSize([email protected]/JEditorPane.java:1345)
at
javax.swing.JViewport.getViewSize([email protected]/JViewport.java:1119)
at
javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport([email protected]/BasicScrollPaneUI.java:330)
at
javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged([email protected]/BasicScrollPaneUI.java:1126)
at
javax.swing.JViewport.fireStateChanged([email protected]/JViewport.java:1490)
at
javax.swing.JViewport.setView([email protected]/JViewport.java:1089)
at
javax.swing.JScrollPane.setViewportView([email protected]/JScrollPane.java:980)
at
org.apache.jmeter.visualizers.RenderAsText.showTextResponse(RenderAsText.java:36)
at
org.apache.jmeter.visualizers.RenderAsText.renderResult(RenderAsText.java:29)
at
org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:400)
at
org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:373)
at
javax.swing.JTree.fireValueChanged([email protected]/JTree.java:2967)
at
javax.swing.JTree$TreeSelectionRedirector.valueChanged([email protected]/JTree.java:3456)
at
javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged([email protected]/DefaultTreeSelectionModel.java:641)
at
javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange([email protected]/DefaultTreeSelectionModel.java:1111)
at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths([email protected]/DefaultTreeSelectionModel.java:297)
at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath([email protected]/DefaultTreeSelectionModel.java:191)
at
javax.swing.JTree.setSelectionPath([email protected]/JTree.java:1656)
```
/cc @weisJ
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]