2 Replies Latest reply on Dec 5, 2016 10:08 AM by Giuseppe Talarico

    slow method under jboss wildfly-10.0.0.Final

    Giuseppe Talarico Newbie

      Good morning,

      am new to the forum, I write because I have an execution slowness of a method under jboss. In practice I run the same method (read simply a no intermediate calls) and only client data structure with a 356 ms time under jboss with a 5500 ms.

      I do the same operations with the difference that in the second case the application is deployed under application servers.

      Thank you

        • 1. Re: slow method under jboss wildfly-10.0.0.Final
          Tomaz Cerar Master

          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
            Giuseppe Talarico Newbie

            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));

              }