[JBoss JIRA] (JBDS-4789) Disable "show method result after a step operation" by default
by Ondrej Dockal (Jira)
[ https://issues.jboss.org/browse/JBDS-4789?page=com.atlassian.jira.plugin.... ]
Ondrej Dockal edited comment on JBDS-4789 at 10/3/19 5:31 AM:
--------------------------------------------------------------
I have the feature enabled by default in fresh install of codeready studio. Reopening... (It seems I found the buggy place)
Update: No I did not find it. If you check the plugin_customization file all the properties are distinguished with plugins with "/" instead of dot. But change did not fix it.
was (Author: odockal):
I have the feature enabled by default in fresh install of codeready studio. Reopening... (It seems I found the buggy place)
> Disable "show method result after a step operation" by default
> --------------------------------------------------------------
>
> Key: JBDS-4789
> URL: https://issues.jboss.org/browse/JBDS-4789
> Project: Red Hat CodeReady Studio (devstudio)
> Issue Type: Enhancement
> Components: openshift, product
> Affects Versions: 12.13.0.AM1
> Reporter: André Dietisheim
> Assignee: André Dietisheim
> Priority: Major
> Fix For: 12.13.0.AM1
>
> Attachments: show-method-result-after-step-operation.png
>
>
> Stepping over code while debugging is very very slow in current Eclipse. Turns out that this is due to a preference setting that is enabled by default:
> *show method result after a step operation*
> !show-method-result-after-step-operation.png!
> We thus should consider turning this off by default in CRStudio.
> The issue is being reported/discussed in Eclipse bugs at https://bugs.eclipse.org/bugs/show_bug.cgi?id=533702 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=536751 where a slowdown of 10x is reported. Eclipse thus is considering turning it off by default: https://bugs.eclipse.org/bugs/show_bug.cgi?id=533702#c7
> This is especially painful when remote debugging applications in OpenShift: JBIDE-26794
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-763) [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
by Eric Williams (Jira)
[ https://issues.jboss.org/browse/ERT-763?page=com.atlassian.jira.plugin.sy... ]
Eric Williams resolved ERT-763.
-------------------------------
Resolution: Done
> [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
> -----------------------------------------------------
>
> Key: ERT-763
> URL: https://issues.jboss.org/browse/ERT-763
> Project: Eclipse Release Train
> Issue Type: Task
> Components: Platform
> Reporter: Friendly Jira Robot
> Assignee: Eric Williams
> Priority: Critical
> Labels: 4.14_M1, SWT, bzira
>
> Please launch the attached snippet on Windows (tried Windows 10) and Linux (tried latest Antergos). It should show a dialog shell on top of a top-level shell. On Windows, you will see just one line of output:
> Got SWT.Show
> but on Linux you will see an endless list of
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> ...
> followed by some critical messages
> ...
> (SWT:8995): GLib-GObject-CRITICAL **: 12:22:33.245: g_closure_add_invalidate_notifier: assertion 'closure->n_inotifiers < CLOSURE_MAX_N_INOTIFIERS' failed
> Got SWT.Show
> ...
> followed by the exception
> Exception in thread "main" java.lang.StackOverflowError
> at java.base/java.lang.String.getBytes(String.java:981)
> at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:166)
> at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:162)
> at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:239)
> at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:221)
> at java.base/java.util.Collections$UnmodifiableMap.get(Collections.java:1454)
> at java.base/java.lang.ProcessEnvironment.getenv(ProcessEnvironment.java:85)
> at java.base/java.lang.System.getenv(System.java:996)
> at org.eclipse.swt.widgets.Shell.updateDecorations(Shell.java:1808)
> at org.eclipse.swt.widgets.Shell.gtk_realize(Shell.java:1865)
> at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2195)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:6140)
> at org.eclipse.swt.internal.gtk.GTK._gtk_widget_realize(Native Method)
> at org.eclipse.swt.internal.gtk.GTK.gtk_widget_realize(GTK.java:8928)
> at org.eclipse.swt.widgets.Control.paintWindow(Control.java:623)
> at org.eclipse.swt.widgets.Shell.setInitialBounds(Shell.java:2416)
> at org.eclipse.swt.widgets.Control.createWidget(Control.java:834)
> at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:163)
> at org.eclipse.swt.widgets.Decorations.createWidget(Decorations.java:251)
> at org.eclipse.swt.widgets.Shell.<init>(Shell.java:290)
> at org.eclipse.swt.widgets.Shell.<init>(Shell.java:369)
> at LinuxCrash.lambda$main$0(LinuxCrash.java:16)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1405)
> at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:2708)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1944)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1942)
> at LinuxCrash.lambda$main$0(LinuxCrash.java:19)
> ...
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-763) [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
by Eric Williams (Jira)
[ https://issues.jboss.org/browse/ERT-763?page=com.atlassian.jira.plugin.sy... ]
Eric Williams reassigned ERT-763:
---------------------------------
Sprint: devex #173 Oct 2019
Assignee: Eric Williams
> [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
> -----------------------------------------------------
>
> Key: ERT-763
> URL: https://issues.jboss.org/browse/ERT-763
> Project: Eclipse Release Train
> Issue Type: Task
> Components: Platform
> Reporter: Friendly Jira Robot
> Assignee: Eric Williams
> Priority: Critical
> Labels: 4.14_M1, SWT, bzira
>
> Please launch the attached snippet on Windows (tried Windows 10) and Linux (tried latest Antergos). It should show a dialog shell on top of a top-level shell. On Windows, you will see just one line of output:
> Got SWT.Show
> but on Linux you will see an endless list of
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> Got SWT.Show
> ...
> followed by some critical messages
> ...
> (SWT:8995): GLib-GObject-CRITICAL **: 12:22:33.245: g_closure_add_invalidate_notifier: assertion 'closure->n_inotifiers < CLOSURE_MAX_N_INOTIFIERS' failed
> Got SWT.Show
> ...
> followed by the exception
> Exception in thread "main" java.lang.StackOverflowError
> at java.base/java.lang.String.getBytes(String.java:981)
> at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:166)
> at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:162)
> at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:239)
> at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:221)
> at java.base/java.util.Collections$UnmodifiableMap.get(Collections.java:1454)
> at java.base/java.lang.ProcessEnvironment.getenv(ProcessEnvironment.java:85)
> at java.base/java.lang.System.getenv(System.java:996)
> at org.eclipse.swt.widgets.Shell.updateDecorations(Shell.java:1808)
> at org.eclipse.swt.widgets.Shell.gtk_realize(Shell.java:1865)
> at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2195)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:6140)
> at org.eclipse.swt.internal.gtk.GTK._gtk_widget_realize(Native Method)
> at org.eclipse.swt.internal.gtk.GTK.gtk_widget_realize(GTK.java:8928)
> at org.eclipse.swt.widgets.Control.paintWindow(Control.java:623)
> at org.eclipse.swt.widgets.Shell.setInitialBounds(Shell.java:2416)
> at org.eclipse.swt.widgets.Control.createWidget(Control.java:834)
> at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:163)
> at org.eclipse.swt.widgets.Decorations.createWidget(Decorations.java:251)
> at org.eclipse.swt.widgets.Shell.<init>(Shell.java:290)
> at org.eclipse.swt.widgets.Shell.<init>(Shell.java:369)
> at LinuxCrash.lambda$main$0(LinuxCrash.java:16)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1405)
> at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:2708)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1944)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1942)
> at LinuxCrash.lambda$main$0(LinuxCrash.java:19)
> ...
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-763) [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
by Friendly Jira Robot (Jira)
Friendly Jira Robot created ERT-763:
---------------------------------------
Summary: [GTK3] Recursive loop of SWT.Show events [EBZ#551624]
Key: ERT-763
URL: https://issues.jboss.org/browse/ERT-763
Project: Eclipse Release Train
Issue Type: Task
Components: Platform
Reporter: Friendly Jira Robot
Please launch the attached snippet on Windows (tried Windows 10) and Linux (tried latest Antergos). It should show a dialog shell on top of a top-level shell. On Windows, you will see just one line of output:
Got SWT.Show
but on Linux you will see an endless list of
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
Got SWT.Show
...
followed by some critical messages
...
(SWT:8995): GLib-GObject-CRITICAL **: 12:22:33.245: g_closure_add_invalidate_notifier: assertion 'closure->n_inotifiers < CLOSURE_MAX_N_INOTIFIERS' failed
Got SWT.Show
...
followed by the exception
Exception in thread "main" java.lang.StackOverflowError
at java.base/java.lang.String.getBytes(String.java:981)
at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:166)
at java.base/java.lang.ProcessEnvironment$Variable.valueOfQueryOnly(ProcessEnvironment.java:162)
at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:239)
at java.base/java.lang.ProcessEnvironment$StringEnvironment.get(ProcessEnvironment.java:221)
at java.base/java.util.Collections$UnmodifiableMap.get(Collections.java:1454)
at java.base/java.lang.ProcessEnvironment.getenv(ProcessEnvironment.java:85)
at java.base/java.lang.System.getenv(System.java:996)
at org.eclipse.swt.widgets.Shell.updateDecorations(Shell.java:1808)
at org.eclipse.swt.widgets.Shell.gtk_realize(Shell.java:1865)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2195)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6140)
at org.eclipse.swt.internal.gtk.GTK._gtk_widget_realize(Native Method)
at org.eclipse.swt.internal.gtk.GTK.gtk_widget_realize(GTK.java:8928)
at org.eclipse.swt.widgets.Control.paintWindow(Control.java:623)
at org.eclipse.swt.widgets.Shell.setInitialBounds(Shell.java:2416)
at org.eclipse.swt.widgets.Control.createWidget(Control.java:834)
at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:163)
at org.eclipse.swt.widgets.Decorations.createWidget(Decorations.java:251)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:290)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:369)
at LinuxCrash.lambda$main$0(LinuxCrash.java:16)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1405)
at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:2708)
at org.eclipse.swt.widgets.Shell.open(Shell.java:1944)
at org.eclipse.swt.widgets.Shell.open(Shell.java:1942)
at LinuxCrash.lambda$main$0(LinuxCrash.java:19)
...
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5888)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-762) [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
by Eric Williams (Jira)
[ https://issues.jboss.org/browse/ERT-762?page=com.atlassian.jira.plugin.sy... ]
Eric Williams resolved ERT-762.
-------------------------------
Resolution: Done
> [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
> ----------------------------------------------------------------------------------
>
> Key: ERT-762
> URL: https://issues.jboss.org/browse/ERT-762
> Project: Eclipse Release Train
> Issue Type: Task
> Components: Platform
> Reporter: Friendly Jira Robot
> Assignee: Eric Williams
> Priority: Major
> Labels: 4.14_M1, SWT, bzira
>
> I've noticed a slow performance of TextLayout.getBounds() method on Linux. The profiler shows an excessive amount of calls to OS.pango_layout_get_line_count(layout) method. Looking through the code I'm noticing that this is due to the bad design in TextLayout class, as it repeats calls to same OS methods repeatedly in a loop.
> The TextLayout.getBounds() method looks like this:
> public Rectangle getBounds() {
> checkLayout();
> Rectangle bounds = DPIUtil.autoScaleDown(getDevice(), getBoundsInPixels());
> int lineCount = OS.pango_layout_get_line_count(layout);
> int totalLineheight = getScaledVerticalIndent();
> for (int i = 0; i < lineCount; i++) {
> totalLineheight += this.getLineBounds(i).height + OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout));
> }
> bounds.height = totalLineheight;
> return bounds;
> }
> Here I believe the result of OS.pango_layout_get_spacing(layout) could be cached. Further down the line this calls TextLayout.getLineBoundsInPixels method.
> Rectangle getLineBoundsInPixels(int lineIndex) {
> computeRuns();
> int lineCount = OS.pango_layout_get_line_count(layout);
> if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE);
> long iter = OS.pango_layout_get_iter(layout);
> if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES);
> for (int i = 0; i < lineIndex; i++) OS.pango_layout_iter_next_line(iter);
> PangoRectangle rect = new PangoRectangle();
> OS.pango_layout_iter_get_line_extents(iter, null, rect);
> OS.pango_layout_iter_free(iter);
> int x = OS.PANGO_PIXELS(rect.x);
> int y = OS.PANGO_PIXELS(rect.y);
> int width = OS.PANGO_PIXELS(rect.width);
> int height = OS.PANGO_PIXELS(rect.height);
> if (ascentInPoints != -1 && descentInPoints != -1) {
> height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints));
> }
> x += Math.min (indent, wrapIndent);
> return new Rectangle(x, y, width, height);
> }
> This method repeats the call to OS.pango_layout_get_line_count. Also things like computeRuns() and OS.pango_layout_get_iter(layout) could be done once per TextLayout.getBounds call. Done in a loop this quickly escalates to slow performance.
> I believe TextLayout.getBounds() should be refactored to minimize repeated calls and reuse results.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-762) [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
by Eric Williams (Jira)
[ https://issues.jboss.org/browse/ERT-762?page=com.atlassian.jira.plugin.sy... ]
Eric Williams reassigned ERT-762:
---------------------------------
Sprint: devex #173 Oct 2019
Assignee: Eric Williams
> [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
> ----------------------------------------------------------------------------------
>
> Key: ERT-762
> URL: https://issues.jboss.org/browse/ERT-762
> Project: Eclipse Release Train
> Issue Type: Task
> Components: Platform
> Reporter: Friendly Jira Robot
> Assignee: Eric Williams
> Priority: Major
> Labels: 4.14_M1, SWT, bzira
>
> I've noticed a slow performance of TextLayout.getBounds() method on Linux. The profiler shows an excessive amount of calls to OS.pango_layout_get_line_count(layout) method. Looking through the code I'm noticing that this is due to the bad design in TextLayout class, as it repeats calls to same OS methods repeatedly in a loop.
> The TextLayout.getBounds() method looks like this:
> public Rectangle getBounds() {
> checkLayout();
> Rectangle bounds = DPIUtil.autoScaleDown(getDevice(), getBoundsInPixels());
> int lineCount = OS.pango_layout_get_line_count(layout);
> int totalLineheight = getScaledVerticalIndent();
> for (int i = 0; i < lineCount; i++) {
> totalLineheight += this.getLineBounds(i).height + OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout));
> }
> bounds.height = totalLineheight;
> return bounds;
> }
> Here I believe the result of OS.pango_layout_get_spacing(layout) could be cached. Further down the line this calls TextLayout.getLineBoundsInPixels method.
> Rectangle getLineBoundsInPixels(int lineIndex) {
> computeRuns();
> int lineCount = OS.pango_layout_get_line_count(layout);
> if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE);
> long iter = OS.pango_layout_get_iter(layout);
> if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES);
> for (int i = 0; i < lineIndex; i++) OS.pango_layout_iter_next_line(iter);
> PangoRectangle rect = new PangoRectangle();
> OS.pango_layout_iter_get_line_extents(iter, null, rect);
> OS.pango_layout_iter_free(iter);
> int x = OS.PANGO_PIXELS(rect.x);
> int y = OS.PANGO_PIXELS(rect.y);
> int width = OS.PANGO_PIXELS(rect.width);
> int height = OS.PANGO_PIXELS(rect.height);
> if (ascentInPoints != -1 && descentInPoints != -1) {
> height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints));
> }
> x += Math.min (indent, wrapIndent);
> return new Rectangle(x, y, width, height);
> }
> This method repeats the call to OS.pango_layout_get_line_count. Also things like computeRuns() and OS.pango_layout_get_iter(layout) could be done once per TextLayout.getBounds call. Done in a loop this quickly escalates to slow performance.
> I believe TextLayout.getBounds() should be refactored to minimize repeated calls and reuse results.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (ERT-762) [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
by Friendly Jira Robot (Jira)
Friendly Jira Robot created ERT-762:
---------------------------------------
Summary: [GTK] Performance of TextLayout.getBounds() is very bad for long text [EBZ#551588]
Key: ERT-762
URL: https://issues.jboss.org/browse/ERT-762
Project: Eclipse Release Train
Issue Type: Task
Components: Platform
Reporter: Friendly Jira Robot
I've noticed a slow performance of TextLayout.getBounds() method on Linux. The profiler shows an excessive amount of calls to OS.pango_layout_get_line_count(layout) method. Looking through the code I'm noticing that this is due to the bad design in TextLayout class, as it repeats calls to same OS methods repeatedly in a loop.
The TextLayout.getBounds() method looks like this:
public Rectangle getBounds() {
checkLayout();
Rectangle bounds = DPIUtil.autoScaleDown(getDevice(), getBoundsInPixels());
int lineCount = OS.pango_layout_get_line_count(layout);
int totalLineheight = getScaledVerticalIndent();
for (int i = 0; i < lineCount; i++) {
totalLineheight += this.getLineBounds(i).height + OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout));
}
bounds.height = totalLineheight;
return bounds;
}
Here I believe the result of OS.pango_layout_get_spacing(layout) could be cached. Further down the line this calls TextLayout.getLineBoundsInPixels method.
Rectangle getLineBoundsInPixels(int lineIndex) {
computeRuns();
int lineCount = OS.pango_layout_get_line_count(layout);
if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE);
long iter = OS.pango_layout_get_iter(layout);
if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES);
for (int i = 0; i < lineIndex; i++) OS.pango_layout_iter_next_line(iter);
PangoRectangle rect = new PangoRectangle();
OS.pango_layout_iter_get_line_extents(iter, null, rect);
OS.pango_layout_iter_free(iter);
int x = OS.PANGO_PIXELS(rect.x);
int y = OS.PANGO_PIXELS(rect.y);
int width = OS.PANGO_PIXELS(rect.width);
int height = OS.PANGO_PIXELS(rect.height);
if (ascentInPoints != -1 && descentInPoints != -1) {
height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints));
}
x += Math.min (indent, wrapIndent);
return new Rectangle(x, y, width, height);
}
This method repeats the call to OS.pango_layout_get_line_count. Also things like computeRuns() and OS.pango_layout_get_iter(layout) could be done once per TextLayout.getBounds call. Done in a loop this quickly escalates to slow performance.
I believe TextLayout.getBounds() should be refactored to minimize repeated calls and reuse results.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months