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 Nov 15, 2023
1 parent 2aa67c0 commit ab5ba2d
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 @@ -53,7 +53,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 @@ -72,7 +71,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 @@ -87,7 +85,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 @@ -120,16 +117,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 ab5ba2d

Please sign in to comment.