Why is Applet Slower than Application?

S

Sanny

After lot of reading I found, JVM takes control of the Applet and
Browser has nothing to do with the Applet.

But then I have a few Question.

Say I have a System with 2 GB RAM. Will I be able to Create an Array
of Integer with Large Memory Size taking upto 2 GB RAM? Or the Browser
will not allow Large Arrays?

int[][][] BigArray = new int[1000][1000][1000]; Will such big array be
allowed on an Applet?

Can I get the information about RAM on a System and initialize arrays
depending on the Maximum Memory the Desktop has?

Can I know in an applet whether the System is Dual Procesor or Quad
Processor or a 8 core Processor is there any code in Applet to know
about Hardware Configurations of the system it is running on?

Why do Applet so much limited in functionality?

I see Flash are so Fast. If you design an Animation in Flash it loads
in 1 second and Runs so smoothly. While Java Applet Blurs so much????

Why can't .Sun develop Applet which work as good as Flash? Both uses
plugin then why Java plugin so bad?

Can these slowness and restrictions be removed from Applets easily???

Can I give a Button In an Applet which asks for user Confirmation to
speedup the Applet and once the user Confirms the Applet runs as an
Application taking all resources from the Computer?

Bye
Sanny
 
S

Sanny

I heard c is very fast than Applet.

Can I make a Function in C language and Call through an Applet And
then return the resut to the Applet. So the GUI will be applet based
and Processing of Functions will be done in C or C#? Is it feasible to
do such a thing?

Activex are designed in C language so Are Activex faster than Applets?
I f I create an ActiveX and ask the Applet to get result from ActiveX
can that be possible?

Or I just ask the user to download a c.exe and Applet calls that
program to get results from functions? So that it gets full processing
speed of C language.

Bye
Sanny
 
N

Nigel Wade

Sanny said:
I heard c is very fast than Applet.

Who from?
Can I make a Function in C language and Call through an Applet And
then return the resut to the Applet. So the GUI will be applet based
and Processing of Functions will be done in C or C#? Is it feasible to
do such a thing?

Feasible, I suppose so. But your applet will need to be signed, you would need
to provide the user with the C code and the means to install it, and the user
will be required to relinquish all the protections which the applet sandbox
provides them with.
Activex are designed in C language so Are Activex faster than Applets?

Faster at what?
I f I create an ActiveX and ask the Applet to get result from ActiveX
can that be possible?

Why would you want to? ActiveX is restricted to Internet Explorer on Windows.
The entire point of using applets is that they are cross platform. If you are
going to make certain that your applet will only run on Windows/IE why bother
using a Java applet at all?
Or I just ask the user to download a c.exe and Applet calls that
program to get results from functions? So that it gets full processing
speed of C language.

Even less reason to use an applet. If the user has to download, install and run
your c.exe, why would you (or they) want to have an applet as well?
 
J

Joshua Cranmer

Sanny said:
Say I have a System with 2 GB RAM. Will I be able to Create an Array
of Integer with Large Memory Size taking upto 2 GB RAM? Or the Browser
will not allow Large Arrays?

1. Capitalization of Words Is not a Random choice. Only the first word
of a sentence and proper nouns should be capitalized. Acronyms and code
have different semantics, though.
int[][][] BigArray = new int[1000][1000][1000]; Will such big array be
allowed on an Applet?

2. Do you have 4GB of main+virtual memory handy? I believe that Windows,
as most consumers have it, does not allow a process to take more than 4
GB of virtual memory. This is not a limitation limited by Java, or by
the applet model, but by the OS and system configuration.

3. Why do you need so much memory?
Can I get the information about RAM on a System and initialize arrays
depending on the Maximum Memory the Desktop has?

4. No.

5. Why would you want to do this? The only thing I can think of is for
monitoring cache resources, and this is not a method I would use to
dictate cache.

6. Java 5 (IIRC) and 6 both allow one to declare monitoring of memory by
the running process.
Can I know in an applet whether the System is Dual Procesor or Quad
Processor or a 8 core Processor is there any code in Applet to know
about Hardware Configurations of the system it is running on?

7. No. You can set up normal multithreaded systems, though.

8. Again, what information would you want to find out that matters
greatly to the running of your program?
Why do Applet so much limited in functionality?

9. Because you didn't explicitly install the code. For example, you
don't want some website's applet surreptitiously starting up and reading
/etc/passwd (for *nix systems) back to its home site, or copying the
contents of your My Documents folder (for Windows systems). You can make
applets trusted, which requires the user to explicitly authorize access
to you via a dialog.
I see Flash are so Fast. If you design an Animation in Flash it loads
in 1 second and Runs so smoothly. While Java Applet Blurs so much????

10. One question mark is enough. While on that subject, I would like to
point out the issue of haphazard capitalization again.

11. Flash is optimized for animations, whereas Java is not. There is
also the issue of Java VM start times.
Why can't .Sun develop Applet which work as good as Flash? Both uses
plugin then why Java plugin so bad?

12. It's `Sun', not `.Sun'.

13. I think applets work better than Flash in many cases.

14. The issue is not that they're plugins, but the design of the code.
I've never looked heavily into how Flash works, but IIRC, a Flash
application with as much design logic as the typical Java applet will
run into similar problems.
Can these slowness and restrictions be removed from Applets easily???

15. Preload the Java VM to ease slowness.

16. Create trusted applets to remove security restrictions, and hope
that the users grant you these permissions.
Can I give a Button In an Applet which asks for user Confirmation to
speedup the Applet and once the user Confirms the Applet runs as an
Application taking all resources from the Computer?

17. An application that takes all my RAM, CPU usage, and HD space? Just
what ARE you doing that needs to use so many resources?

18. See above answers for me details.

Final nit:
19. Take a small amount of time to edit for proper capitalization,
grammar, and punctuation. Large amounts of improper usages are very
distracting and difficult to read.
 
A

Arne Vajhøj

Sanny said:
Say I have a System with 2 GB RAM. Will I be able to Create an Array
of Integer with Large Memory Size taking upto 2 GB RAM? Or the Browser
will not allow Large Arrays?

int[][][] BigArray = new int[1000][1000][1000]; Will such big array be
allowed on an Applet?

Actually the amount of physical memory only determines the
performance.

Whether you can have such a big array depends on the virtual memory.

32 bit OS : no
64 bit OS : yes
Can I get the information about RAM on a System and initialize arrays
depending on the Maximum Memory the Desktop has?

No. But you can get the maximum heap size Java can get.

See Runtime.maxMemory().
Can I know in an applet whether the System is Dual Procesor or Quad
Processor or a 8 core Processor is there any code in Applet to know
about Hardware Configurations of the system it is running on?
No.

Why do Applet so much limited in functionality?

For security reasons.
I see Flash are so Fast. If you design an Animation in Flash it loads
in 1 second and Runs so smoothly. While Java Applet Blurs so much????

I think that depends a lot on the Java programmer.
Why can't .Sun develop Applet which work as good as Flash? Both uses
plugin then why Java plugin so bad?

If you like Flash then use Flash.
Can I give a Button In an Applet which asks for user Confirmation to
speedup the Applet and once the user Confirms the Applet runs as an
Application taking all resources from the Computer?

That is not how preemptive multitasking OS'es work.

Arne
 
A

Arne Vajhøj

Sanny said:
I heard c is very fast than Applet.

It can be.
Can I make a Function in C language and Call through an Applet And
then return the resut to the Applet. So the GUI will be applet based
and Processing of Functions will be done in C or C#? Is it feasible to
do such a thing?
No.

Activex are designed in C language so Are Activex faster than Applets?
I f I create an ActiveX and ask the Applet to get result from ActiveX
can that be possible?

I would not expect users to allow ActiveX modules to run.
Or I just ask the user to download a c.exe and Applet calls that
program to get results from functions? So that it gets full processing
speed of C language.

Applet security will not allow that.

Arne
 
R

Roedy Green

Say I have a System with 2 GB RAM. Will I be able to Create an Array
of Integer with Large Memory Size taking upto 2 GB RAM? Or the Browser
will not allow Large Arrays?

The browser itself eats ram you could potentially use with a
application instead of an Applet. You can configure heap size etc, on
the Java.exe command line. I don't know how you could do the same in
an Applet. You have to take what the browser author thought was
appropriate.
 
A

Arne Vajhøj

Joshua said:
2. Do you have 4GB of main+virtual memory handy? I believe that Windows,
as most consumers have it, does not allow a process to take more than 4
GB of virtual memory.

32 bit Windows : only somewhere around 1.6-1.7

64 bit Windows : plenty

Arne
 
R

Roedy Green

Can I make a Function in C language and Call through an Applet And
then return the resut to the Applet. So the GUI will be applet based
and Processing of Functions will be done in C or C#? Is it feasible to
do such a thing?

In theory yes, but the problem is getting the DLL installed on the
client machine in a place the Applet can find it. The Applet must be
signed. It is MUCH easier to use Java Web Start. I tried to
implement SetClock as an Applet and gave up. It is now does with JWS.

See http://mindprod.com/jgloss/javawebstart.html
http://mindprod.com/jgloss/applet.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top