-
Notifications
You must be signed in to change notification settings - Fork 396
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
large memory usage #879
Comments
@A1trdX Thanks for the reply. My apologies, I realize I forgot to include the environment I was using:
I ran the examples from above again: I tried with the JVM flags as well, first I also repeated the test with no JVM flags, with I added the I suppose the issue could indeed come from JDK 1.8's GC, which is Parallel GC by default. |
Describe the bug
XChart
seems to be using a larger amount of memory than expected, i.e. compared toJFreeChart
.To Reproduce
I coded two simple examples, where clicking a button adds X number of data points to an XY chart (i.e. X=18000 to represent one sample per second for 5 hours). One example uses
XChart
and the other usesJFreeChart
.I used
VisualVm
to monitor the heap usage before and after adding the data points. I included the screenshots below. For each test, I clicked the button to add the data 5 times, each click roughly 10 seconds apart.XChart Example
JFreeChart Example
Screenshots
XChart
JFreeChart
Expected behavior
You can see from the screenshots,
XChart
is using several times more memory thanJFreeChart
: up to 1.25 GB at the peak. Eventually, it looks like garbage collection kicks in, but even at this pointXChart
is using around 210 MB while JFreeChart is around 42 MB. Note, if I manually trigger garbage collection, the memory usage inXChart
drops to negligible levels (~10 MB)It seems unexpected for
XChart
to be using that amount of memory; ideally less memory would be needed.Thank you!
The text was updated successfully, but these errors were encountered: