Quantcast
Channel: SCN : Popular Discussions - SAP Crystal Reports, version for Eclipse
Viewing all articles
Browse latest Browse all 893

Slowness with setTableLocation when using Java 8 (1.8)

$
0
0

I have a NetBeans 8.0.1 platform application, and I've run into some problems with Crystal Reports running very slowly with Java 8, where everything seems to be fine in Java 7.

I narrowed the problem code fragment to the CR setTableLocation() method:

 

ITable tb1 = rcdProposal.getDatabaseController().getDatabase().getTables().findTableByAlias("CdProposal");
int i1 = rcdProposal.getDatabaseController().getDatabase().getTables().findByAlias("CdProposal");
ru1.setTableLocation(tb1, fileXML); 
DatabaseController dbc1 = rcdProposal.getDatabaseController(); 
ITable tb2 = dbc1.getDatabase().getTables().getTable(i1); 
Long l1 = System.currentTimeMillis(); 
dbc1.setTableLocation(tb2, tb1); //<-- problem statement 
l1 = System.currentTimeMillis() - l1; 
String str1 = System.getProperty("java.version") + " dbc1.setTableLocation Time elpased (ms): "     + Long.toString(l1);
System.out.println(str1);

The issue seems to be that the first time that the setTableLocation() method is executed, it takes a very long time in Java 8, although subsequent calls are much faster. Here is the output for five report views for the Netbeans 8.0.2 app running on both Java 1.8 and Java 1.7

1.8.0_25 dbc1.setTableLocation Time elpased (ms): 38705
1.8.0_25 dbc1.setTableLocation Time elpased (ms): 1717
1.8.0_25 dbc1.setTableLocation Time elpased (ms): 1672
1.8.0_25 dbc1.setTableLocation Time elpased (ms): 1712
1.8.0_25 dbc1.setTableLocation Time elpased (ms): 1668

 

1.7.0_45 dbc1.setTableLocation Time elpased (ms): 2292
1.7.0_45 dbc1.setTableLocation Time elpased (ms): 334
1.7.0_45 dbc1.setTableLocation Time elpased (ms): 287
1.7.0_45 dbc1.setTableLocation Time elpased (ms): 191
1.7.0_45 dbc1.setTableLocation Time elpased (ms): 150

 

Any ideas? Apparently class loading has somehow changed in Java 8.  I've googled around, but really can't find anything that addresses this issue.  I've tried increasing various memory allocations, tried server mode for the JVM, but nothing seems to work.

Thanks!


Viewing all articles
Browse latest Browse all 893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>