mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 435142 - Duplicate *running events cause UI slowness
Change-Id: I4b30e6cd62b7cc822442ddd14c3c1440f6bab376 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/26780 Tested-by: Hudson CI Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This commit is contained in:
parent
44d66b4750
commit
6996d3f93c
2 changed files with 14 additions and 2 deletions
|
@ -1529,12 +1529,18 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo
|
|||
return;
|
||||
}
|
||||
|
||||
MIThreadRunState threadState = fThreadRunStates.get(e.getDMContext());
|
||||
if (threadState != null && threadState.fLatestEvent instanceof IResumedDMEvent) {
|
||||
// Ignore multiple running events in a row. They will only slow down the UI
|
||||
// for no added value.
|
||||
return;
|
||||
}
|
||||
|
||||
if (fRunToLineActiveOperation == null && fStepInToSelectionActiveOperation == null) {
|
||||
// No special case here, i.e. send notification
|
||||
getSession().dispatchEvent(new ResumedEvent(e.getDMContext(), e), getProperties());
|
||||
} else {
|
||||
// Either RunToLine or StepIntoSelection operations are active
|
||||
MIThreadRunState threadState = fThreadRunStates.get(e.getDMContext());
|
||||
if (threadState == null || threadState.fLatestEvent instanceof ISuspendedDMEvent) {
|
||||
// Need to send out Running event notification, only once per operation, then a stop event is expected
|
||||
// at the end of the operation
|
||||
|
|
|
@ -482,13 +482,19 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
|||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(final MIRunningEvent e) {
|
||||
public void eventDispatched(MIRunningEvent e) {
|
||||
if (fDisableNextRunningEvent) {
|
||||
fDisableNextRunningEvent = false;
|
||||
// We don't broadcast this running event
|
||||
return;
|
||||
}
|
||||
|
||||
if (fLatestEvent instanceof IResumedDMEvent) {
|
||||
// Ignore multiple running events in a row. They will only slow down the UI
|
||||
// for no added value.
|
||||
return;
|
||||
}
|
||||
|
||||
IDMEvent<?> event = null;
|
||||
// Find the container context, which is used in multi-threaded debugging.
|
||||
IContainerDMContext containerDmc = DMContexts.getAncestorOfType(e.getDMContext(), IContainerDMContext.class);
|
||||
|
|
Loading…
Add table
Reference in a new issue