-
1. Re: slow method under jboss wildfly-10.0.0.Final
ctomc Dec 5, 2016 8:39 AM (in response to giuseppe80)You will need to provide more information to what you are doing.
What your method is doing, how it is deployed, what is your enviroment, etc ...
-
2. Re: slow method under jboss wildfly-10.0.0.Final
giuseppe80 Dec 5, 2016 10:08 AM (in response to ctomc)Hello,
I run the code (the same server and eclipse neon) below in two different modes:
1) through a single client application (run -> java application) and the execution time is 500ms
2) if you launch the same method in a web application (jsf2 + spring) the method employs 5000ms.
Thanks for your help
public void testDT(AtomicReference<Integer> nRec,NObject dataTable,AtomicReference<String> errMsg)throws JavonetException {
NObject NETrows, NETobj, NETcolumns;
long ms1, ms2, tms;
int i, k;
this.nRecord = nRec.get();
System.out.println("n. record: " + String.valueOf(this.nRecord));
ms1 = java.lang.System.currentTimeMillis();
// colonne (numero, nome e tipo dati)
NETcolumns = dataTable.get("Columns");
int nc = NETcolumns.get("Count");
this.columns = new ColDesc[nc];
for ( i=0; i<nc; i++ ) {
NETobj = NETcolumns.getIndexRef(i);
this.columns[i] = new ColDesc();
this.columns[i].name = NETobj.get("ColumnName");
this.columns[i].type = ((NObject) NETobj.get("DataType")).invoke("ToString");
}
// numero di righe
NETrows = dataTable.get("Rows");
int nr = NETrows.get("Count");
// matrice di output
this.rows = new Object[nr][nc];
// recupera le righe del datatable
for ( i=0; i<nr; i++ ) {
NETobj = NETrows.getIndexRef(i); // riga
for (k=0; k<nc; k++) { // campi della riga
this.rows[i][k] = NETobj.getIndex(k);
}
}
ms2 = java.lang.System.currentTimeMillis();
System.out.println("recupero dati ms: " + String.valueOf(ms2-ms1));
}