From aee4e47937a0fc865af70cd57c8af7ede4dc40fd Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Tue, 24 Nov 2020 13:21:02 +0300 Subject: [PATCH] [debugger] dropped obsolete registry flag GitOrigin-RevId: ba9c1e2e175acb96fa1ff0820552e2d5d23a99b0 --- .../debugger/jdi/VirtualMachineProxyImpl.java | 49 ------------------- .../util/resources/misc/registry.properties | 1 - 2 files changed, 50 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/jdi/VirtualMachineProxyImpl.java b/java/debugger/impl/src/com/intellij/debugger/jdi/VirtualMachineProxyImpl.java index 0160e06b465c..8f5b65253090 100644 --- a/java/debugger/impl/src/com/intellij/debugger/jdi/VirtualMachineProxyImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/jdi/VirtualMachineProxyImpl.java @@ -659,10 +659,6 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy { } //myAllThreadsDirty = true; myTimeStamp++; - - if (Registry.is("debugger.types.preload")) { - scheduleTypesDataPreload(); - } } @Override @@ -707,7 +703,6 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy { } } - private abstract static class Capability { private ThreeState myValue = ThreeState.UNSURE; @@ -726,48 +721,4 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy { protected abstract boolean calcValue(); } - - private long myLastTypesCheckTime; - private int myLastTypesSize; - - // Preload all supertypes information for faster queries (especially for emulated method breakpoints) - private void scheduleTypesDataPreload() { - if (DebuggerUtilsImpl.isRemote(myDebugProcess)) { - return; - } - DebuggerManagerThreadImpl.assertIsManagerThread(); - long time = System.currentTimeMillis(); - if (time > myLastTypesCheckTime + 10000) { - List types = allClasses(); - if (time > myLastTypesCheckTime + 60000 || Math.abs(types.size() - myLastTypesSize) > 1000) { - scheduleTypesDataPreload(types.iterator()); - myLastTypesCheckTime = time; - myLastTypesSize = types.size(); - } - } - } - - private void scheduleTypesDataPreload(Iterator iterator) { - if (iterator.hasNext()) { - myDebugProcess.getManagerThread().schedule(PrioritizedTask.Priority.LOWEST, () -> { - long start = System.currentTimeMillis(); - do { - ReferenceType type = iterator.next(); - if (type.isPrepared()) { - try { - DebuggerUtilsImpl.supertypes(type); - } - catch (ObjectCollectedException ignored) { - } - } - if (System.currentTimeMillis() - start > 50) { // batch process for 50ms - // schedule here to allow other LOWEST priority commands to be processed - scheduleTypesDataPreload(iterator); - return; - } - } - while (iterator.hasNext()); - }); - } - } } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index be177d462a05..4a10a5179125 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -470,7 +470,6 @@ debugger.call.tracing=false debugger.call.tracing.arguments=true debugger.renderers.annotations=true debugger.smart.step.inplace=true -debugger.types.preload=false debugger.field.pin.to.top=true debugger.jb.jdi=true debugger.jb.jdi.description=Use the new forked jdi implementation