2

I'm currently experiencing a weird behaviour of my Java programm:
The Program is a JavaFX Desktop application which uses a local Selenium Standalone Server to Open a WebApp, make some Inputs and download an Excel File. It the Reads the Excel-File and compares it to another Excel-Sheet and marks differences.

It's working, the problem I'm facing is, that the generated JAR runs slower than when I start the Project from Eclipse. The only significant Performance difference is when I'm comparing the Excel Sheets with Apache POI.

I narrowed the problem down to the JRE - If i start the Jar it uses 32 bit JRE if I start from Eclipse it uses 64 bit JDK.
I monitored both processes with JConsole and the Jar on the 32 bit nearly uses 20 mins while the 64 bit only takes about 30 seconds.

Are there any problems with Apache Poi on 32 bit system? Or do you have any ideas, suggestions how I can monitor better and maybe find the bottleneck for the significant performance?

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
KilledByCheese
  • 852
  • 10
  • 30

1 Answers1

3

Instead of JConsole try Java Mission Control with Flight Recorder to collect performance metrics. This should help you to understand where is the bottleneck e.g. CPU vs Network. The most common performance problem would be insufficient heap memory and garbage collector struggling to free it (e.g. frequent OldSpace full GC cycles).

Check the license to see if you can use it, as far as I remember it's free on a development, non-production environment but there were changes to the license recently with the tool being open sources.

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
  • I took alook with Java Mission Control and the Flight Recorder and it seems like the Garbace Collector works slower and more frequent when I use 32 bit jvm. The Garbage Collector takes 4s60ms on 32 bit and only 17ms912µs on 64 bit. But still there is a performace/time difference from ~15 min – KilledByCheese May 15 '18 at 13:26
  • Compare the heap size with special care looking at the NewSize. There should be more statistics in the Code tab, maybe the sampling profiler will tell you where the time is spent. – Karol Dowbecki May 15 '18 at 13:37