This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

How to know what is consumming most CPU  RSS feed

 
Ranch Hand
Posts: 89
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I am facing a problem raised with legacy code that I don't know what to do.

The issue is regarding  an app developed in java-swing. After several monts working on the app I have just spot it is consuming high amounts of CPU time when opening a PopupMenu based on JPopupMenu.
This Class belongs to a jar file wrapping the calls to JPopMenu. When opening that popup menu you see runing a top command that X process reaches 100% and java around 70%. The app stills looks fluent, but I was told to reduce the CPU consume. By contrast, running jconsole or jvisualvm the CPU is no more than 10%. Then... I don't understand what happens: why those high differences between top and jconsole; don't understand how to relate X process and java. Could be the rendering/ the mouse listeners? Why this Component take over the CPU and the rest of windows, the behaviour is correct?

By the way, the app is working over RHEL 7 and motif windows manager as desktop. One more thing: when trying to debug the app, eclipse stops at breakpoint and everthing freezes.

May you please give me some light to solve the problem?

Thanks in advance.
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!