File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
visualvm/heapviewer/src/org/graalvm/visualvm/heapviewer/java/impl Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 29
29
import java .awt .event .ActionEvent ;
30
30
import java .awt .event .ItemEvent ;
31
31
import java .net .URL ;
32
+ import java .util .Arrays ;
32
33
import java .util .Collection ;
33
34
import java .util .List ;
34
35
import javax .swing .AbstractAction ;
@@ -196,9 +197,14 @@ public void run() {
196
197
}
197
198
}
198
199
200
+ private static final int MAX_EXPAND_SIZE = 1000 ;
201
+ private static final int DEFAULT_EXPAND_SIZE = 800 ;
199
202
200
203
private void setupDefault () {
201
204
CCTNode [] children = objectsView .getRoot ().getChildren ();
205
+ if (children .length > MAX_EXPAND_SIZE ) {
206
+ children = Arrays .copyOf (children , DEFAULT_EXPAND_SIZE );
207
+ }
202
208
for (CCTNode child : children ) objectsView .expandNode ((HeapViewerNode )child );
203
209
}
204
210
You can’t perform that action at this time.
0 commit comments