[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] More Debugger Array Viewing Changes...
|
Hi,
Given GDB performance, we saw CDT start to time out on large array
requests. The following patch corrects this by scaling the time out with
the number of children being retrieved. I have not looked at the head on
this so your mileage may vary. On 1.0.1 with this and the MIParser change
you can open 16k arrays. I decided the value of testing larger sizes was
not worth it. :)
I should mention that there appears to be a bug / lack of feature in
VariablesViewContentProvider.getChildren(). It's my personal opinion that
it should use BusyIndicator and a runnable so that an hourglass icon pops
up for these long fetches. There's really no good place to put it lower in
the call chain. It is reasonable to want to look at a 4k array. There is a
noticeable pause for this, it should be covered with an hourglass but
there's really no way to hook it.
Thanks!
-Chris
diff -r -u xide_compare/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Value.java xide/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Value.java
--- xide_compare/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Value.java Sat Feb 1 12:54:43 2003
+++ xide/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Value.java Wed Jun 25 14:48:42 2003
@@ -99,8 +99,17 @@
CommandFactory factory = mi.getCommandFactory();
MIVarListChildren var =
factory.createMIVarListChildren(variable.getMIVar().getVarName());
+
+ /* GDB is appallingly slow on array fetches. As as slow as 128 entries
+ * per second on NT gdbs with slow processors. We need to set a timeout
+ * that's appropraitely scaled by number of children to give the slave
+ * GDB time to respond. In the end perhaps we want a UI for this. As it
+ * is, let's just make up a number that's 5 seconds for us plus one
+ * second for every 128 entries. */
+ int timeout = variable.getMIVar().getNumChild() * 8 + 5000;
+
try {
- mi.postCommand(var);
+ mi.postCommand(var, timeout);
MIVarListChildrenInfo info = var.getMIVarListChildrenInfo();
if (info == null) {
throw new CDIException("No answer");