-
Java speedup
Hi - can anyone point me to som information about how to optimize my java
deveolment. In our company we have a web product where a user log in via
a browser - the user profile is loaded from an oracle 8i database - the user
make the changes and the profile is written back in to the database. My problem
is know that it takes to long to load and write the profile (and to open
the secure conection) - would it help with an application server (witch one
is best for java ???) to speedup JSP or witch approch should i take to get
a clear view over this problem.
Thanks
-
Re: Java speedup
HTTPS is slow and will always be slower that HTTP. Your best bet is to pool
database connections and probably make sure you have fast servers [hardware].
But before spending any money spend some time finding where the bottle necks
are.
"Lars Roland" <lars@kompakt.dk> wrote:
>
>Hi - can anyone point me to som information about how to optimize my java
>deveolment. In our company we have a web product where a user log in via
>a browser - the user profile is loaded from an oracle 8i database - the
user
>make the changes and the profile is written back in to the database. My
problem
>is know that it takes to long to load and write the profile (and to open
>the secure conection) - would it help with an application server (witch
one
>is best for java ???) to speedup JSP or witch approch should i take to get
>a clear view over this problem.
>
>Thanks
-
Re: Java speedup
>Hi - can anyone point me to som information about how to optimize my java
>development.
To follow on from the last poster, there are several techniques you can use
to identify the bottlenecks in your code.
These start off quite simply. You can use System.currentTimeMillis() to print
the time to millisecond precision. So either use System.out.println or a
log file to write out the timestamp at key places throughout the program.
Then you can see which statements are taking the longest time to run.
You can also use a tool called a profiler to see which methods are taking
the longest to execute. Commercial tools are available for this, or a simple
system is included in the Java SDK. The O'Reilly book Java Performance Tuning
has details of this, but essentially you would run a command similar to:
java -Xrunhprof:cpu=samples,thread=y YourClassName
Bear in mind that profilers often interfere slightly with the execution of
the code, especially in threaded environments, but they will give a good
indication of what is going on.
Debuggers such as those with IDEs can also help when you use the Step Into
command to trace a program a line at a time. My favourite Java IDE is called
IDEA, see www.intellij.com for a time-limited fully-functional demo.
Hope this helps,
Ian.
www.conversant.uk.com - IT Consulting and Development
-
Re: Java speedup
Move it to compiled code or buy bigger machines. (The reason Sun created java
was to sell big machines, excellent marketing!) Tweaking it will help a
small amount however....giving up java will help enormously.
Now those that are on the java jihad will start screaming...but they know
you give up performance when you buy into java, or buy a bigger machine only
to just catch up!
"Lars Roland" <lars@kompakt.dk> wrote:
>
>Hi - can anyone point me to som information about how to optimize my java
>deveolment. In our company we have a web product where a user log in via
>a browser - the user profile is loaded from an oracle 8i database - the
user
>make the changes and the profile is written back in to the database. My
problem
>is know that it takes to long to load and write the profile (and to open
>the secure conection) - would it help with an application server (witch
one
>is best for java ???) to speedup JSP or witch approch should i take to get
>a clear view over this problem.
>
>Thanks
-
Re: Java speedup
"Ted" <java.@127.0.0.1> wrote:
>
>Move it to compiled code or buy bigger machines. (The reason Sun created
java
>was to sell big machines, excellent marketing!) Tweaking it will help a
>small amount however....giving up java will help enormously.
>
>Now those that are on the java jihad will start screaming...but they know
>you give up performance when you buy into java, or buy a bigger machine
only
>to just catch up!
First, I'm not on the Java Jihad.
No it won't help enormously. One will still have to deal with bottlenecks
with other developement 'platforms'. Pretty much any performance problem
can be solved with more memory and a faster CPU. Modern software typically
requires faster machines and more memory esp. Windows.
Also, Java was created for embedded software.
If you have GUI issues with Swing, try SWT.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|