Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Routine Running in Servlet Extremenly Slow. Fast on Normal Class.

 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Guys i am developing a javaee. aplication i am using hibernate..
i am facing a extrange problem.. i am testing my code on a Java desktop application for testing before moving the code for the servlets..

this code. is doing the job on Count: 1456ms.. fetching 10814 records.. on a Normal java class NOT a servlet.

the results are correct. but when i run this routine on a servlet. is running extremly slow.
giving the next. results... (the fetch is 10814 records, with the exactly same parameters..).
and i am running the routine at least 5 times. consecutives giving the same results..
the results on the servlet. Time: 8923ms..10814 Records..
what this is happening. 1456 ms. vs. 8923ms. is weird.

this is driving me nuts.. please give with some tips..
thanks a lot best regards..
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any other queries running when you start you app?
 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hebert Coelho wrote:

i am running the java ee aplication on localhost.. only that process.. at the time.. that's very weird i have 10 hours trying to find out the problem without success..


 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hebert Coelho wrote:Is there any other queries running when you start you app?


i have found a drawback. but still without solution the same code with the same parameters running on the normal java class. is returning the columns without fetch. that's why it's fast. but in the servlet. is returning the data as well.. why is this happening... that's why is so slow..
Images of LogFactor5.

Servlet Results: http://www.megaupload.com/?d=OQ7XLSQH
Java Normal Class: http://www.megaupload.com/?d=SVWI1JET

best regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic