Skip to main content
title changed to better fit question text
Source Link
gnat
  • 20.9k
  • 29
  • 115
  • 295

Factors that affects JAVAaffect performance of this Java application

I am quite stumped on this.

I have a JAVAJava application which does the following:

  1. Tool takes a document which it will parse.
  2. Tool calls external webservice
  3. Tool completes execution

However, when I tried to run this application in two different 'environments', there is a huge gap between the performance of the tool. On the first environment, it takes only 30 seconds, while on the second tool, it took 40 minutes.

An environment consists of the following:

  1. The machine the app runs on.
  2. The connection to the webservice.
  3. The input document that will be parsed by the tool.

I have been in constant communication between the people on the second environment (40 minute execution), and I am quite stumped. 

I am trying to isolate the issue. First, I asked the specs of the machine that they are using and that seems to be fine. I then asked their connection to the webservice and it is okay too. 

The input document between the two environments (For this case), are the same; I kept it a constant variable so that I have less issues to check.

Weirdly enough, I asked for more information and found out that it takes a long time with the parsing of the input document. In the 40 minute execution, the tool was 'stuck' on the parsing for 38 minutes. I was thinking if it was my code, but I am quite confused that the first environment only took seconds to parse the same document.

The general structure of my parsing is as follows:

do{
   ... code here.
   do {
      ... code here.
      for{}
   }while
}while
for{}
do{
  ... code here.
}while

code here are mixtures of if statements and function calls (only one function is used though and it is just generally ifs, no loops).

I do know that nested loops take a while and this is worse than O(n^2) and I know I need to work on my optimization, but could it really be the code that causes this huge gap between performance or is there another factor that may cause this gap?

Factors that affects JAVA performance

I am quite stumped on this.

I have a JAVA application which does the following:

  1. Tool takes a document which it will parse.
  2. Tool calls external webservice
  3. Tool completes execution

However, when I tried to run this application in two different 'environments', there is a huge gap between the performance of the tool. On the first environment, it takes only 30 seconds, while on the second tool, it took 40 minutes.

An environment consists of the following:

  1. The machine the app runs on.
  2. The connection to the webservice.
  3. The input document that will be parsed by the tool.

I have been in constant communication between the people on the second environment (40 minute execution), and I am quite stumped. I am trying to isolate the issue. First, I asked the specs of the machine that they are using and that seems to be fine. I then asked their connection to the webservice and it is okay too. The input document between the two environments (For this case), are the same; I kept it a constant variable so that I have less issues to check.

Weirdly enough, I asked for more information and found out that it takes a long time with the parsing of the input document. In the 40 minute execution, the tool was 'stuck' on the parsing for 38 minutes. I was thinking if it was my code, but I am quite confused that the first environment only took seconds to parse the same document.

The general structure of my parsing is as follows:

do{
   ... code here.
   do {
      ... code here.
      for{}
   }while
}while
for{}
do{
  ... code here.
}while

code here are mixtures of if statements and function calls (only one function is used though and it is just generally ifs, no loops).

I do know that nested loops take a while and this is worse than O(n^2) and I know I need to work on my optimization, but could it really be the code that causes this huge gap between performance or is there another factor that may cause this gap?

Factors that affect performance of this Java application

I have a Java application which does the following:

  1. Tool takes a document which it will parse.
  2. Tool calls external webservice
  3. Tool completes execution

However, when I tried to run this application in two different 'environments', there is a huge gap between the performance of the tool. On the first environment, it takes only 30 seconds, while on the second tool, it took 40 minutes.

An environment consists of the following:

  1. The machine the app runs on.
  2. The connection to the webservice.
  3. The input document that will be parsed by the tool.

I have been in constant communication between the people on the second environment (40 minute execution), and I am quite stumped. 

I am trying to isolate the issue. First, I asked the specs of the machine that they are using and that seems to be fine. I then asked their connection to the webservice and it is okay too. 

The input document between the two environments (For this case), are the same; I kept it a constant variable so that I have less issues to check.

Weirdly enough, I asked for more information and found out that it takes a long time with the parsing of the input document. In the 40 minute execution, the tool was 'stuck' on the parsing for 38 minutes. I was thinking if it was my code, but I am quite confused that the first environment only took seconds to parse the same document.

The general structure of my parsing is as follows:

do{
   ... code here.
   do {
      ... code here.
      for{}
   }while
}while
for{}
do{
  ... code here.
}while

code here are mixtures of if statements and function calls (only one function is used though and it is just generally ifs, no loops).

I do know that nested loops take a while and this is worse than O(n^2) and I know I need to work on my optimization, but could it really be the code that causes this huge gap between performance or is there another factor that may cause this gap?

Source Link

Factors that affects JAVA performance

I am quite stumped on this.

I have a JAVA application which does the following:

  1. Tool takes a document which it will parse.
  2. Tool calls external webservice
  3. Tool completes execution

However, when I tried to run this application in two different 'environments', there is a huge gap between the performance of the tool. On the first environment, it takes only 30 seconds, while on the second tool, it took 40 minutes.

An environment consists of the following:

  1. The machine the app runs on.
  2. The connection to the webservice.
  3. The input document that will be parsed by the tool.

I have been in constant communication between the people on the second environment (40 minute execution), and I am quite stumped. I am trying to isolate the issue. First, I asked the specs of the machine that they are using and that seems to be fine. I then asked their connection to the webservice and it is okay too. The input document between the two environments (For this case), are the same; I kept it a constant variable so that I have less issues to check.

Weirdly enough, I asked for more information and found out that it takes a long time with the parsing of the input document. In the 40 minute execution, the tool was 'stuck' on the parsing for 38 minutes. I was thinking if it was my code, but I am quite confused that the first environment only took seconds to parse the same document.

The general structure of my parsing is as follows:

do{
   ... code here.
   do {
      ... code here.
      for{}
   }while
}while
for{}
do{
  ... code here.
}while

code here are mixtures of if statements and function calls (only one function is used though and it is just generally ifs, no loops).

I do know that nested loops take a while and this is worse than O(n^2) and I know I need to work on my optimization, but could it really be the code that causes this huge gap between performance or is there another factor that may cause this gap?