Skip to content

Commit f855a85

Browse files
committed
Revert "Memoize QFunctionTableModel::data() (#853)"
This reverts commit b7b7bf7.
1 parent 4302188 commit f855a85

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

angrmanagement/ui/widgets/qfunction_table.py

-13
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __init__(self, workspace, instance, func_list):
5050
self.workspace = workspace
5151
self.instance = instance
5252
self._config = Conf
53-
self._data_cache = {}
5453

5554
def __len__(self):
5655
if self._func_list is not None:
@@ -69,7 +68,6 @@ def func_list(self) -> List["Function"]:
6968
def func_list(self, v):
7069
self._func_list = None
7170
self._raw_func_list = v
72-
self._data_cache.clear()
7371
self.emit(SIGNAL("layoutChanged()"))
7472

7573
def filter(self, keyword):
@@ -84,7 +82,6 @@ def filter(self, keyword):
8482
if self._func_match_keyword(func, keyword, extra_columns=extra_columns)
8583
]
8684

87-
self._data_cache.clear()
8885
self.emit(SIGNAL("layoutChanged()"))
8986

9087
def rowCount(self, *args, **kwargs): # pylint:disable=unused-argument
@@ -117,16 +114,6 @@ def data(self, index, role):
117114
return None
118115

119116
col = index.column()
120-
121-
key = (row, col, role)
122-
if key in self._data_cache:
123-
value = self._data_cache[key]
124-
else:
125-
value = self._data_uncached(row, col, role)
126-
self._data_cache[key] = value
127-
return value
128-
129-
def _data_uncached(self, row, col, role):
130117
func = self.func_list[row]
131118

132119
if role == Qt.DisplayRole:

0 commit comments

Comments
 (0)