Reputation: 6365
When developing a Java GUI application (SWT or Swing based, should not matter), how to best profile the responsiveness, e.g. what consumes the time if the application feel sluggish on certain operations like clicking a button until something happens. The problem is in my understanding that the delays are quite low (usually < 0.5s) and hence hard to measure, because the most profilers I know you need to start and stop later.
Upvotes: 2
Views: 631
Reputation: 725
YourKit Java Profiler has built-in probe which automatically records all AWT/Swing events longer than 0.3 second, which can cause UI irresponsiveness: https://www.yourkit.com/docs/java/help/awtevents.jsp
Disclaimer: I work for YourKit
Upvotes: 1
Reputation: 48105
The problem with profiling UI applications is that calls on the event dispatch thread (EDT) often originate from other threads or trigger background operations that eventually call something on the EDT. This can make it difficult to see the effects of a user action separately.
JProfiler has a feature called "Async tracking" that can track calls into the event dispatch threads of both AWT and SWT:
Disclaimer: My company develops JProfiler.
Upvotes: 3