Skip to content

Commit

Permalink
Variable Explorer: Put lower limits on when to load data on demand fo…
Browse files Browse the repository at this point in the history
…r lists and dicts

This was motivated by issue #2593, after noticing people is using those
collections to save big DataFrames
  • Loading branch information
ccordoba12 committed Aug 23, 2015
1 parent ea3105d commit ac1bd3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spyderlib/widgets/dicteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
is_text_string, is_binary_string, getcwd, u)


LARGE_NROWS = 5000
LARGE_NROWS = 100


def display_to_value(value, default_value, ignore_errors=True):
Expand Down Expand Up @@ -117,7 +117,7 @@ def __setitem__(self, key, value):

class ReadOnlyDictModel(QAbstractTableModel):
"""DictEditor Read-Only Table Model"""
ROWS_TO_LOAD = 200
ROWS_TO_LOAD = 50

def __init__(self, parent, data, title="", names=False, truncate=True,
minmax=False, remote=False):
Expand Down Expand Up @@ -1271,9 +1271,9 @@ def setup(self, data, title='', readonly=False, width=500,
constant = 121
row_height = 30
error_margin = 20
height = constant + row_height*min([20, datalen]) + error_margin
height = constant + row_height*min([15, datalen]) + error_margin
self.resize(width, height)

self.setWindowTitle(self.widget.get_title())
if is_text_string(icon):
icon = get_icon(icon)
Expand Down

0 comments on commit ac1bd3b

Please sign in to comment.