From 95e867eb0e3982a32d8695be0fbe5a01879eca96 Mon Sep 17 00:00:00 2001 From: "liana.bakradze" Date: Mon, 17 Apr 2017 16:33:25 +0300 Subject: [PATCH] remove table size constraints (PY-14960) --- python/helpers/pydev/_pydevd_bundle/pydevd_vars.py | 14 ++++++-------- .../debugger/containerview/PyDataViewerPanel.java | 5 +---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py index 7815566bdcb8..f3d9d030fd2d 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py @@ -412,8 +412,6 @@ def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=SEN MAXIMUM_ARRAY_SIZE = 100 -MAX_SLICE_SIZE = 1000 - def table_like_struct_to_xml(array, name, roffset, coffset, rows, cols, format): _, type_name, _ = get_type(array) @@ -511,19 +509,19 @@ def array_to_meta_xml(array, name, format): if is_row: rows = 1 - cols = min(len(array), MAX_SLICE_SIZE) + cols = len(array) if cols < len(array): reslice = '[0:%s]' % (cols) array = array[0:cols] else: cols = 1 - rows = min(len(array), MAX_SLICE_SIZE) + rows = len(array) if rows < len(array): reslice = '[0:%s]' % (rows) array = array[0:rows] elif l == 2: - rows = min(array.shape[-2], MAX_SLICE_SIZE) - cols = min(array.shape[-1], MAX_SLICE_SIZE) + rows = array.shape[-2] + cols = array.shape[-1] if cols < array.shape[-1] or rows < array.shape[-2]: reslice = '[0:%s, 0:%s]' % (rows, cols) array = array[0:rows, 0:cols] @@ -561,8 +559,8 @@ def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): """ - num_rows = min(df.shape[0], MAX_SLICE_SIZE) - num_cols = min(df.shape[1], MAX_SLICE_SIZE) + num_rows = df.shape[0] + num_cols = df.shape[1] if (num_rows, num_cols) != df.shape: df = df.iloc[0:num_rows, 0: num_cols] slice = '.iloc[0:%s, 0:%s]' % (num_rows, num_cols) diff --git a/python/src/com/jetbrains/python/debugger/containerview/PyDataViewerPanel.java b/python/src/com/jetbrains/python/debugger/containerview/PyDataViewerPanel.java index a01572367551..ffaf34fbf766 100644 --- a/python/src/com/jetbrains/python/debugger/containerview/PyDataViewerPanel.java +++ b/python/src/com/jetbrains/python/debugger/containerview/PyDataViewerPanel.java @@ -55,8 +55,6 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; public class PyDataViewerPanel extends JPanel { - private final static int COLUMNS_IN_DEFAULT_VIEW = 1000; - private final static int ROWS_IN_DEFAULT_VIEW = 1000; private static final Logger LOG = Logger.getInstance(PyDataViewerPanel.class); private final Project myProject; @NotNull private final PyFrameAccessor myFrameAccessor; @@ -181,8 +179,7 @@ public class PyDataViewerPanel extends JPanel { } private void updateUI(@NotNull ArrayChunk chunk, @NotNull PyDebugValue debugValue, @NotNull DataViewStrategy strategy) { - AsyncArrayTableModel model = strategy.createTableModel(Math.min(chunk.getRows(), ROWS_IN_DEFAULT_VIEW), - Math.min(chunk.getColumns(), COLUMNS_IN_DEFAULT_VIEW), this, debugValue); + AsyncArrayTableModel model = strategy.createTableModel(chunk.getRows(), chunk.getColumns(), this, debugValue); model.addToCache(chunk); UIUtil.invokeLaterIfNeeded(() -> {