0

CandleStick chart and OHLC chart (HIGH low chart ) are created using jfreechart-1.0.14 using OHLCSEriesCollection, OHLCSeries and ChartFactory(createCandlestickChart, createHighLowChart respectively) and data is added using javax.swing.timer with time interval of 100ms.

When memory usage is recorded using jconsole for two hours for both application it shows huge memory difference in both application.

In candlestick chart memory was increased to 400 Megabit(50 MB) while in OHLC chart it increases to 1 Gigabit(256 MB).

What could be the possible reason for that ?

learner
  • 1,952
  • 7
  • 33
  • 62
  • Pleas update your original [question](http://stackoverflow.com/q/17509427/230513) on this topic to show your [SSCCE](http://sscce.org/)s and [profile](http://stackoverflow.com/q/2064427/230513) results. – trashgod Jul 08 '13 at 10:19
  • @trashgod my code is pretty long and I was able to reduce from 2Gb to 1Gb you can see [this](http://stackoverflow.com/questions/17502969/why-javafx-based-charts-take-more-memory-as-compared-to-swing-based-charts) it has code which take 2Gb. To reduce it to one 1Gb I removed tooltip and String which were passed to my constructor and setSeriesAndDataStyleClasses and in css kept only last three blocks in css file – learner Jul 08 '13 at 10:25
  • @whoever tagged **This question may already have an answer here:** is wrong it is question on JFreeChart alone and that question is on javafx and also it doesnothave any answer. So please check before tagging. – learner Jul 08 '13 at 10:28
  • Do you really mean 400 MegaBITS? If so, why not say 50 Megabytes? I'm sure people would find the latter less confusing. – Andrzej Doyle Jul 08 '13 at 10:32
  • because my profile show in bits that's why I didn't convert it. – learner Jul 08 '13 at 10:33
  • You should still cite your previous question for reference; absent examples and profiles, this question is too broad (formerly [_not constructive_](http://meta.stackexchange.com/q/171732/163188)); there are myriad reasons for the two charts to have different memory usage; JFreeChart 1.0.15 is current. – trashgod Jul 08 '13 at 11:12
  • yes I know jfreechart 1.0.15 is current but when I created them using 14 version. I think OHLC has lot of garbage value being instantiated and then released for creating its GUI as on average memory usage is almost same. – learner Jul 08 '13 at 11:27

0 Answers0