Solved

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

Posted on 2000-03-02
14
345 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
Comment Utility
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
Comment Utility
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
Comment Utility
- 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
 
LVL 5

Author Comment

by:sgoms
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 5

Author Comment

by:sgoms
Comment Utility
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
Comment Utility
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
Comment Utility
well can u give points b4 u finish this project ?
:)
0
 
LVL 5

Author Comment

by:sgoms
Comment Utility
;-)
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
Comment Utility
anybody will do but do distribute it to somebody or a bunch of guys...
:)
0
 
LVL 6

Expert Comment

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

Author Comment

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

Thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now