Solved

***URGENT*** Jrun/Servlet/SQL is very very slow!

Posted on 2000-03-02
14
348 Views
Last Modified: 2013-11-24
Iam using a servlet to fetch data from a SQL 7.0 database and display it on the browser via a Excel spreadsheet.(Iam using a  'Formula One' Java bean to do that). The first time i load the servlet, a default parameter is passed to it and data is fetched and gets displayed. When i select a diff parameter thru a drop down list box to display data thru' the same servlet but on a diff worksheet it works fine. BUT, if i try to access the same worksheet again ot try to alter the parameters, all it does is 'Web site found. Waiting for reply..' and stops.

Iam using IE 5.O. Is it to do with the databse or with the worksheet?
any leads wud be appreciated. My deadline is today..so its really URGENT!

Thanks in advance.
0
Comment
Question by:sgoms
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 8

Expert Comment

by:diakov
ID: 2578199
Do you say that fetching for a the same worksheet two times in a row does not work the second time?

Nik
0
 
LVL 5

Author Comment

by:sgoms
ID: 2578225
I have isolated the problem to populating the grid from the database.
The worksheets does not matter. whether it be the same worksheet or a new one, if i dont populate the sheet with data its very fast..if i try to populate it then it slows down & dies!

i guess for this u shud've worked with Formula one or Excel/JDBC.. but if u can throw in any other ideas they'r welcome.
0
 
LVL 8

Expert Comment

by:diakov
ID: 2578255
- Could it be something with the caching the same URLs? Servlets are normally called through with GET method which is basically a parametrized URL.

- Another idea, close the connection to the database between connections. This might lead you to the problem.

- Yet another one, copy and paste the servlet call in the browser address tab (surpass the spreadsheet component) and see whether the data that comes back does come back quickly. May be this will give you a hint where the problem is.


Nik
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 5

Author Comment

by:sgoms
ID: 2578359
1. No URL is not a problem 'cos when i do it without populating the databse it works fine. so the dat gets passed to the servlet thru the get method.

2. The connection gets closed bet the 2 calls. shud i or shud i not?

3. The servlet outputs the excel component so i cant surpass it!

0
 
LVL 6

Expert Comment

by:jpk041897
ID: 2578384
Start by isolating the problem further.

Instead of populating the grid, send the data to System.out.

Determine if whats failing is the front end or the back end.

If its the front end, try populating ony one cell, then only one row, then a few rows. Determine if the problem is related to volume.

Try instantiating a new component on the servlet each time. The component (spreadsheet) might not be garbage collected before your next call to it. Isnure that the servlet is compleatly unloaded and the grid instance is set to null between calls.

0
 
LVL 5

Expert Comment

by:mbormann
ID: 2579516
sgoms ,
Tidestone Formula 1 bean is BUGGY ,see for confirmation
cheekycj's question ,he isolated it after 1/2 months

http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=10235790 

hope it helps you,and you change the bean to something else.
It just eats up Memory like a Hog...

his research after many days found out

We are back and alive!!! I don't know if all of you noticed but the question disappeared after the new year and we just got back.

My memory issues were mostly caused by a Java Bean called Formula1.

It is a spreadsheet bean.  We were loading 403K rows and 38 cols in it.

After extensive tech. discussion with their engineers we found out that the bean allocates 44 Bytes per cell w/out any data-- Thats is 643 MB of RAM w/out any DATA!!! so when we were loading about 4 Bytes on average but we allocated 6 Bytes to be conservative and the min required memory was 731 for just the BEAN.  So then adding on the application and other functions and iterations we were going through the new target machine needed about 1GB of memory to run safely.  Needless to say this was not an option for us so we ripped our code apart and wrote code that would break up the history into segments and load segment at a time (partitions of 5-7 days) instead of the whole 30 days of history.  We are still implementing this but it is *supposed* to fix our memory issues.
0
 
LVL 5

Accepted Solution

by:
mbormann earned 300 total points
ID: 2579525
what happened to your other question?
tiltle was something like 'Check if my system is connected to the Net ?'I think that ,that got auto-deleted

again I hope this helps u out
:)
0
 
LVL 5

Author Comment

by:sgoms
ID: 2580910
I contacted the Tidestone tech engineers regarding this problem. Yups..todestone has a problem with populating the grid fast 'cos it takes some time to check the existing contents of the cell(its formula, font etc..) and then popuulates it. so it obviously takes some time.

for the mmt 'cos its the prototype we will be going along with this. and maybe later we can locate a more efficient one.

Thanks experts!
0
 
LVL 5

Author Comment

by:sgoms
ID: 2580928
Iam out of the project which needed 'Check if my system is connected to the Net ?' so i deleted it. ;-)
0
 
LVL 5

Expert Comment

by:mbormann
ID: 2582452
well can u give points b4 u finish this project ?
:)
0
 
LVL 5

Author Comment

by:sgoms
ID: 2585804
;-)
iam done with my work..but 'cos i sortof solved it on my own iam kinda confused as to who to give the points to..
0
 
LVL 5

Expert Comment

by:mbormann
ID: 2588175
anybody will do but do distribute it to somebody or a bunch of guys...
:)
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 2590047
If you solved it yourself, perhaps you should just delete the question.
0
 
LVL 5

Author Comment

by:sgoms
ID: 2592465
Ur comment lead me to contacting the support engg & conclude that Formula One has a performance issue.

Thanks.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
session migration servlets 2 42
factorial example 4 49
java mysql insert application 14 29
Tagging and Merging on Branch 1 30
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question