Skip to content
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

MemoryLeak / CompressScatterSeries blows up #76

Open
laeubi opened this issue Sep 19, 2019 · 2 comments
Open

MemoryLeak / CompressScatterSeries blows up #76

laeubi opened this issue Sep 19, 2019 · 2 comments

Comments

@laeubi
Copy link
Member

laeubi commented Sep 19, 2019

It seems there is a memory leak in the event processing somewhere in SWTChart, maybe a listener seems to hold reference to the compressor, so it creates over and over again data items that then fill up the whole heap.

Currently I see over 400 instance of the CompressScatterSeries taking up 1.5GB ob space for only the boolean arrays

java.lang.OutOfMemoryError: Java heap space
at org.eclipse.swtchart.internal.compress.CompressScatterSeries.addNecessaryPlots(CompressScatterSeries.java:46)
at org.eclipse.swtchart.internal.compress.Compress.compress(Compress.java:149)
at org.eclipse.swtchart.internal.series.SeriesSet.compressAllSeries(SeriesSet.java:308)
at org.eclipse.swtchart.internal.PlotArea.setBounds(PlotArea.java:113)
at org.eclipse.swtchart.internal.ChartLayout.layoutPlot(ChartLayout.java:413)
at org.eclipse.swtchart.internal.ChartLayout.layout(ChartLayout.java:138)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1744)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:1056)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:1007)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:963)
at org.eclipse.swtchart.Chart.updateLayout(Chart.java:347)
at org.eclipse.swtchart.Chart.handleEvent(Chart.java:322)
at org.eclipse.swtchart.extensions.core.AbstractHandledChart.handleEvent(AbstractHandledChart.java:28)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:1104)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1527)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:931)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:693)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1744)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1530)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:931)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:693)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1744)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1530)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:931)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204)

@laeubi
Copy link
Member Author

laeubi commented Sep 19, 2019

It seems the compressor try to find out if at the specified pixel coordinate there is already a datapoint. for low density plots this is much more expensive than simply drawing all points.

@laeubi laeubi closed this as completed Aug 26, 2020
@eselmeister eselmeister reopened this Aug 27, 2020
@eselmeister
Copy link
Contributor

@laeubi Is this issue solved? When closing issues without code contribution, please write a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants