Link to home
Start Free TrialLog in
Avatar of Zolf
ZolfFlag for United Arab Emirates

asked on

Application slow response

hello there,

i have put my java swing application on my hosting site.i also have db taken connection from the hosting company.i am using my application as JNLP.now the problem i have my application frames open slow.i mean it opens after 10-20 sec.what could be the reason.is the problem with the hosting company.i tried using my jnlp with my local db and it opens instantly.please help me to get to the root of this problem.
cheers
ZOlf
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

That's most likely to be the overhead of starting the JVM for the first time. I suspect that once the first frame is open it gets faster?
Avatar of Zolf

ASKER


yes what you mentioned is true for local.but when i try using the application on the hosting server it is slow.even after opening and closing the frame.
Can we test this?
could be the DB network latency issue...
"now the problem i have my application frames open slow"

Do you load any data at startup? If yes, try profiling your initialization process. See what you can load at startup, and what you can defer for either a user action or a background thread.

A lot of swing applications have issues when, they try to load the data in the main awt thread (The one that is responsible for painting your windows).
There should theoretically only be a difference between your two environments on the very first hit. Thereafter the app should run locally. Put application tracing up to full using the Java control panel to see if you can discern any differences
Avatar of Zolf

ASKER


>> Put application tracing up to full using the Java control panel to see if you can discern any differences

how can i do this.do you mean activale JNLP debugging features
Yes, via the control panel
Avatar of Zolf

ASKER


>>could be the DB network latency issue...
can this issue be solved from my side.i mean is this the hosting companies problem or it is from my side
Is this app requesting network resources during the course of its operation?
Avatar of Zolf

ASKER


>>Is this app requesting network resources during the course of its operation?
what do you mean.my application gets data from the db.for example filling CB,Jtables.but at present there are hardly any data i mean there are 10-15 values in CB and 45 rows in the table
I'm trying to determine whether the problem is being caused by the network. For that to be a candidate for the cause of the problem, the application would have to be *unable* to work in offline mode. Is that the case?
Avatar of Zolf

ASKER


in offline mode do you mean local.
when i run the application on my local computer.i mean the application and db is both on my computer the frames load fast.

when i run the jnlp application from my hosting site BUT the db i connect to is on my computer.it is fast.

BUT when i run the JNLP application from my hosting site and also the db is of the hosting company then it is slow.
>>BUT when i run the JNLP application from my hosting site and also the db is of the hosting company then it is slow

Ah - now we're getting somewhere - in the diagnostic sense. You need to speak to the hosting co about this. If they can't speed it up, you might have to try your own caching solution
Avatar of Zolf

ASKER


>>If they can't speed it up, you might have to try your own caching solution
assuming they cannot.Can you please give me some feedback on caching solutions
Avatar of Zolf

ASKER


also what do i need to tell them.i mean technical words
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial