I have an application that I create in Swing. It has a scrollable and scalable chart component that I can pan and zoom. All this is smooth, except that sometimes the user interface stops for about 750 ms, and I donβt know why. This does not always happen, but sometimes something happens in the application, and it starts as a pause every 6-8 seconds.
It seems pretty obvious that there is some kind of event in the EDT that fires 750 ms or so, which shouldn't happen.
How do I configure EDT this way? I would really like to get what will be logged or System.out every time the event is fired on EDT with the total amount of time that has occurred. Is there any way to do this?
Or is there any tool that will do this for me and give me a log of everything that works on EDT and how long it will take?
I would like to go through this magazine, look at everything that takes a lot of time, and find the problem.
source share