• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swing Performance(slow swing)

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I appreciate anyone who could answer my question. It's quite a general one. We developed a Java program written in swing. It works pretty good on most of our PCs. But we have this particular machine where swing runs very slow. The screen dosen't paint completely when you move the window or even freezes. You could see a hole left behind the moving window. This machine is a IBM G40 laptop which has a 3G CPU and 1G memory. It's pretty fast when you run relative large program like Matlab or Mathematica. So I'm wondering what causes the slow swing? Could it be the graphic card? The only part of this laptop that is worse than the other ones is the graphic card, which is an integrated one. Does anyone have this kind of experience that could tell me if it's computer problem or coding problem(we did not optimize our code to improve its performance).
Thanks
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the Swing app do?
 
Buss Wolf
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's like a curve fitting program. You try to get better fit by adjusting the parameters. But I think this has nothing to do with the slow swing because the program isn't really running when we move the windows.
 
author
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Buss, are you 100 percent sure there isn't some code being executed? I would test things using the custom event queue described in this article.

http://elliotth.blogspot.com/2005/05/automatically-detecting-awt-event.html

If you have some heavy processes going on, it should help you detect them. Next I'll plug my own stuff and recommend reading the Desktop Java Live sample chapters available from the link below on Swing threading.

http://www.sourcebeat.com/TitleAction.do?id=10

Moving these processes off the event dispatch thread should resolve your issues. If you don't have long running EDT processes, my next suggestion would be to look into Swing performance issues resolving video cards. There are probably a bunch of them either open or closed for newer versions at bugs.sun.com. Depending on the version of Java you are running, there use to be some switches to use different pipelines which would help things.

Scott Delap
ClientJava.com
Desktop Java Live
 
Buss Wolf
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you! This would help a lot.

Buss
 
Let's get him boys! We'll make him read this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic