I have a loop that iterates 28000 times, when i deploy it to server, it takes around 1.5 minutes to execute. When i am running it locally on my machine, it only takes 2 seconds. I tried everything but it is still taking time.
Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
I have a loop that iterates 28000 times, when i deploy it to server, it takes around 1.5 minutes to execute. When i am running it locally on my machine, it only takes 2 seconds. I tried everything but it is still taking time.
My server has more resources than my local machine so memory and space is almost thrice than my local machine has
Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
There are a million reasons code can run slow on a given machine. For example, your server may have more resources than your local machine, but if the server is past its prime, has a lot of processes running or is configured poorly, those resources will not do you any good. Once I had an application that ran more slowly on the server than my local machine. I had to provide hard data in the form of JAMon (for the application) and Decapo (for the physical platform) benchmarks comparing my laptop against the server before our administrators would take me seriously. We moved the app to more current hardware and the performance "problem" went away.
Our Enterprise Performance FAQ has links to JAMon and Decapo, as well as other Best Practices regarding performance. I'm also going to move this topic to the Performance forum since it isn't really a Struts issue.