For as many versions of IDEA as I can remember, I have had an ongoing issue that has bothered me. The problem is that performance in response to Step Over vs. Resume Program Execution is drastically different.
Imagine I have two lines of code in the middle of a method somewhere:
Set<Things> things = fetchThings();
System.out.println("Number of things: " + things.size);
If I put a breakpoint before each of these lines and debug the program, when the program stops on the first line, I have two choices to move the program pointer to the next line, I can either click on "Step Over" or "Resume Program Execution". Both will then execute the first line and stop at the second line. Using the Resume Program Execution seems to perform the first line at expected speeds. However, if I do "Step Over" it takes much longer.
I just tried a trivial example in a piece of our code where I know I am going to fetch 10 rows of data out of a db. "Resume Program Execution" returns immediately and "Step Over" takes about 3-5 seconds. When a query is much more substantial, the difference is very pronounced.
So, for years, I have found that I have to continually set multiple breakpoints, one before and one after the code I am debugging so I can use the "Resume Program Execution" to step over db access code in a reasonable amount of time.
Has anoyone else experienced this?
Anyone know why this happens?