Bug 530440 - Step over is very slow and much slower than before
Summary: Step over is very slow and much slower than before
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 7
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-29 04:37 EST by Thomas Trost CLA
Modified: 2020-06-04 11:17 EDT (History)
8 users (show)

See Also:


Attachments
Project for slow debugging with oracle jdbc (3.54 KB, application/octet-stream)
2018-08-02 11:06 EDT, Vincent Poutissou CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Trost CLA 2018-01-29 04:37:03 EST
There seems to be an issue with the "Step Over" function resulting in a very slow performance. Consider the following example with an arbitrary function "calculate()" and break points in line 1 and 4:

x1: calculate();
 2: calculate();
 3: calculate();
x4: calculate();

Running the code without break point takes ~1 second. If I continue from line 1 with resume (F8) the running time is comparable. However, if I use step over (F6) it takes several minutes to come to line 2. I tried to localize the time consuming part but it doesn't seem to be always the same part. More frequently Array calls or stream filter calls takes a lot of time.

Furthermore, maybe connected to the above issue. Sometime it happens that Eclipse doesn't react to continuing/resuming operations (F7,F8) and always use the step over function. It even happens although no breakpoints are set in this part of the code which makes debugging impossible.
Comment 1 Till Brychcy CLA 2018-01-29 04:48:28 EST
The slowness may be a result of the "Show method result..." setting in Preferences > Java Debug. The reason is that for this feature "Method Exit Events" are observed, and that causes the JVM to disable the Just-In-Time compiler for the involved methods.

In that case, you have to options:
- Disable that setting
- If no recursive invocations are involved, use "Run to Line" instead of "Step-Over"
Comment 2 Thomas Trost CLA 2018-01-29 07:02:30 EST
I have already disabled this setting. It improved the runtime a bit but still it is very slow as desribed. "Run to line" works fine comparable to "resume". Only "Step over" causes problems.
Comment 3 Sarika Sinha CLA 2018-01-30 22:55:00 EST
can you try disabling "Advanced Source lookup" Preference under Java>Debug ?
Comment 4 Thomas Trost CLA 2018-01-31 11:08:55 EST
Still the same performance.
Comment 5 Nathan Sweet CLA 2018-07-28 17:14:31 EDT
I also suffer from this just about every day.
Comment 6 Vadym Krevs CLA 2018-07-31 10:30:38 EDT
For me the slowness is during stepping over a method that eventually calls SSLContext.getInstance("TLS"). Put a breakpoint immediately after the method that calls SSLContext.getInstance("TLS")  and step over works reasonably quickly.
Comment 7 Vincent Poutissou CLA 2018-08-02 11:06:45 EDT
Created attachment 275239 [details]
Project for slow debugging with oracle jdbc

Project for showing slow step over/into/return on method OracleDriver.connect()
Comment 8 Vincent Poutissou CLA 2018-08-02 11:07:48 EDT
Hi,

Same trouble with Step Into/Step over/ Step return on OracleDriver().connect(...) (ojdbc8) It takes at least 45seconds to step over this method.
If stopped at the line and then skipping all breakpoints (CTRL+ALT+B) or resuming, there's no performance issue.
If stopped after the line, no performance issue.
Not sure if you have Oracle databe, but here's a project for reproducing. It contains a main method calling new OracleDriver().connect(...)