wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Java Routine Running in Servlet Extremenly Slow. Fast on Normal Class. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Java Routine Running in Servlet Extremenly Slow. Fast on Normal Class." Watch "Java Routine Running in Servlet Extremenly Slow. Fast on Normal Class." New topic
Author

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

Cristian Daniel Ortiz Cuellar
Ranch Hand

Joined: Feb 02, 2011
Posts: 81
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

Joined: Jul 14, 2010
Posts: 754

Is there any other queries running when you start you app?


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Cristian Daniel Ortiz Cuellar
Ranch Hand

Joined: Feb 02, 2011
Posts: 81
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

Joined: Feb 02, 2011
Posts: 81
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Routine Running in Servlet Extremenly Slow. Fast on Normal Class.