Skip to content

Commit

Permalink
Revert "Memoize QFunctionTableModel::data() (#853)"
Browse files Browse the repository at this point in the history
This reverts commit b7b7bf7.
  • Loading branch information
mahaloz committed Jun 16, 2023
1 parent 4302188 commit f855a85
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions angrmanagement/ui/widgets/qfunction_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __init__(self, workspace, instance, func_list):
self.workspace = workspace
self.instance = instance
self._config = Conf
self._data_cache = {}

def __len__(self):
if self._func_list is not None:
Expand All @@ -69,7 +68,6 @@ def func_list(self) -> List["Function"]:
def func_list(self, v):
self._func_list = None
self._raw_func_list = v
self._data_cache.clear()
self.emit(SIGNAL("layoutChanged()"))

def filter(self, keyword):
Expand All @@ -84,7 +82,6 @@ def filter(self, keyword):
if self._func_match_keyword(func, keyword, extra_columns=extra_columns)
]

self._data_cache.clear()
self.emit(SIGNAL("layoutChanged()"))

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

col = index.column()

key = (row, col, role)
if key in self._data_cache:
value = self._data_cache[key]
else:
value = self._data_uncached(row, col, role)
self._data_cache[key] = value
return value

def _data_uncached(self, row, col, role):
func = self.func_list[row]

if role == Qt.DisplayRole:
Expand Down

0 comments on commit f855a85

Please sign in to comment.