Java Applet CPU restrictions?
Is there some type of cap as to how much CPU an applet can use? Or will my code run just as fast as a standard java program?
The problem is that applets typically run as Threads in a JVM embedded in the browser. While you can adjust the priority of a Java thread, there is no way to place CPU caps on them. Indeed, I don't think you can even set CPU caps with the OS'es native threads. In the case of UNIX and UNIX-like operating systems, CPU usage limits and other limits are implemented on a per process basis.
Applets generally runs with less privilege than standard applications, but there should be no CPU cap. There have been reports of applets crashing browsers by overusing CPUs, and rather than classifying them as security flaws that need dealing with, they're simply labeled as nuisances.
That said, applets run in a variety of environment, sometimes with little consistency (that's why they're problematic, and why Java Web Start is the recommended alternative). It could very well be the case that certain applet environments impose CPU limits on applets, etc.