• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applet speed

Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm kind of new to writing applets. I just made my first one. It performs a lot of mathematical computation, and there is something I have noticed: the same program ran much faster as an application than it does as an applet. The difference in speed is around 2 to 3 times at least. Is this typical of applets, or have I possibly done something to cause this when I converted my application to an applet? Basically, I just made a simple form with a jbutton on it that sits in the browser window, and when the user pushes the button, it calls the main class of my application with a call like:
The only other thing that I did was put a call in the paint() method to initalize the form.
If applets truly do run slower, then would I have better performance using Java Web Start and keeping the application as is?
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not entirely clear about what you are doing, but here is what I see:
You have a simple application to perform a calculation that spits results to the console or something simple.
You wrapped an applet around that application and put it on a webpage.
Now, in your speed testing are you doing actual timing or just eye-balling it? First, make sure that you are only timing your application code and not any of the applet setup or rendering... basically just your main() method from your example. Applet rendering can be slow, depending on too many factors to go into.
Without a detailed account of the code and the results, it is hard to give a more detailed response.
Hope this helps,
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic