Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is a Java Application much faster than an Applet.

0 views
Skip to first unread message

Sanny

unread,
Dec 10, 2006, 2:44:06 AM12/10/06
to
I have an Applet which works slow, I think as Browser JVM may be slow.
If I convert it into Java Application will it be much faster just as
Application developed in C++ etc.

Thanks
Sanjay

Andrew Thompson

unread,
Dec 10, 2006, 2:58:58 AM12/10/06
to
Sanny wrote:
> I have an Applet

URL?

>.. which works slow, I think as Browser JVM

Browser (make and model), VM (make and version)

>..may be slow.

It is probably the code of the applet that is slow,
what does it do?

> If I convert it into Java Application will it be much faster just as
> Application developed in C++ etc.

( Please add '?' to the end of questions )

Probably not, but it is easy enough to test for any
applet that does not require a complete applet context
(create a frame, create an instance of the applet,
add the applet to the frame, then call init() and
start on the applet instance).

Andrew T.

Andrew Thompson

unread,
Dec 10, 2006, 3:02:50 AM12/10/06
to

Andrew Thompson wrote:
> Sanny wrote:
> > I have an Applet ...
..
> > If I convert it into Java Application will it be much faster ..
..

> Probably not, but it is easy enough to test for any
> applet ...

..given you can launch applets by themselves in a free
floating frame that has its own VM, using web-start.
E.G. <http://www.physci.org/pc/jtest-applet.jnlp>

Andrew T.

Arne Vajhøj

unread,
Dec 10, 2006, 11:42:09 AM12/10/06
to

If the browser and standalone app will use the same
Java version, then I can not see any reason for a
big speed difference.

Arne

Sanny

unread,
Dec 11, 2006, 12:35:04 AM12/11/06
to

> If the browser and standalone app will use the same
> Java version, then I can not see any reason for a
> big speed difference.

I want to speedup my Applet in any way I have three Choices which one
should I choose and which will really help.

1. Convert Applet to a Frame Window.
2. Create a Java Application to run the program instead of Applet
3. Convert this Applet into .exe file using C++/Delphi


Which will be the best way to get fast output.


Bye
Sanny

Ian Wilson

unread,
Dec 11, 2006, 10:13:32 AM12/11/06
to

4. Find out why your applet is slow.

Mark Rafn

unread,
Dec 11, 2006, 12:07:01 PM12/11/06
to
Sanny <soft...@hotmail.com> wrote:
>I want to speedup my Applet in any way I have three Choices which one
>should I choose and which will really help.

Why are these your only choices? Do you think they're equal in the amount of
work involved?

Add to your list
0. Figure out what part of the applet is slow and why.

0.5. Fix the applet.

>1. Convert Applet to a Frame Window.

Usually pretty easy. Unlikely to help very much.

>2. Create a Java Application to run the program instead of Applet

How is this different from #1?

>3. Convert this Applet into .exe file using C++/Delphi

This is a complete rewrite. If you're going to do that, why not actually
profile your applet, figure out what's wrong, and fix that (option 0).

>Which will be the best way to get fast output.

As others have said, it depends on your application.
--
Mark Rafn da...@dagon.net <http://www.dagon.net/>

lakkiredd...@gmail.com

unread,
Dec 12, 2006, 1:42:16 AM12/12/06
to

On Dec 10, 9:42 pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
> Sanny wrote:
> > I have an Applet which works slow, I think as Browser JVM may be slow.
> > If I convert it into Java Application will it be much faster just as

> > Application developed in C++ etc.If the browser and standalone app will use the same

EJP

unread,
Dec 13, 2006, 6:05:46 PM12/13/06
to
Sanny wrote:
> I have an Applet which works slow, I think as Browser JVM may be slow.
> If I convert it into Java Application will it be much faster

Why would there be any difference at all? maybe apart from startup time.

Andrew Thompson

unread,
Dec 13, 2006, 6:21:19 PM12/13/06
to

It might and it might not, but some browsers will share
a JVM instance across pages, &/or sites, whereas others
might dedicate a JVM to each appelt.

Would you expect your applet to work at the same speed if
it were in a VM that was also running two other applets, one
of which was doing repaints every 10 msec, while the other
was doing constant calls to JS via LiveScript?

Andrew T.

Daniel Pitts

unread,
Dec 13, 2006, 7:23:58 PM12/13/06
to

Even if that were the case, I'm not sure that would affect overal
speed, an Applet running in that VM may run faster than another applet
due to thread scheduling. It depends greatly on the VM implementation,
Browser implementation, and OS cpu scheduling implementation.

A good test to see if its the browser specifically, or the applet
itself is to use appletviewer.

Although, I'd be inclined to run a profiler and see exactly where the
time is consumed.

Arne Vajhøj

unread,
Dec 14, 2006, 9:43:02 PM12/14/06
to
Andrew Thompson wrote:
> Would you expect your applet to work at the same speed if
> it were in a VM that was also running two other applets, one
> of which was doing repaints every 10 msec, while the other
> was doing constant calls to JS via LiveScript?

What are you comparing ?

If it is:

1 PC with 1 app JVM doing X and 1 browser JVM doing Y and Z

versus

1 PC with 1 browser JVM doing X, Y and Z

then that should also be rather close.

Unless the JVM implementation is very bad, then the performance
should depend on what is being done (X, Y and Z) - not how
they are distributed among JVM's and whether the JVM i run
by a browser or standalone.

Arne

Andrew Thompson

unread,
Dec 14, 2006, 9:47:44 PM12/14/06
to

Arne Vajhøj wrote:
> Andrew Thompson wrote:
> > Would you expect your applet to work at the same speed if
> > it were in a VM that was also running two other applets, one
> > of which was doing repaints every 10 msec, while the other
> > was doing constant calls to JS via LiveScript?
>
> What are you comparing ?

*

> If it is:
>
> 1 PC with 1 app JVM doing X and 1 browser JVM doing Y and Z
>
> versus
>
> 1 PC with 1 browser JVM doing X, Y and Z

3rd scenario:
1 PC with 1 browser using 1 VM for *3* pages
all doing X, Y and Z.

I was effectively comparing the second & third scenarios.

Andrew T.

0 new messages