scala-ide/scala-ide — pull request #317 by dragos (2013-02-15 17:47:05+00:00)
Title: Make stepping as fast as in the JDT debugger.

Two performance improvements in the way we handle stack frames:

* make `variables` lazy. This way we don't retrieve variables values
unless they are needed (most of the times, they are needed for only one
frame in a full thread stack). Retrieving values requires a roundtrip
to the debugged VM, hitting the network stack.

* don't fire DebugEvents for creation of stack frames. This is the
time consuming part: each frame (can be hundreds) fires one CREATE
event that is put in a queue and a job-dispatch is scheduled to run for
*each* frame in part. This floods the event queue and leads to
lag times in the order of seconds (depending on the stack depth).

I checked (in the debugger) that the JDT debugger does not fire CREATE
events for stack frames, so I'm suggesting we do the same thing.