mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-10-07 02:03:52 +00:00
GUI: fix performance bottleneck with Qt signals
This commit is contained in:
parent
8af904fad6
commit
34279ebf08
1
.gitignore
vendored
1
.gitignore
vendored
@ -76,3 +76,4 @@ src/build-*/
|
||||
.scannerwork/
|
||||
bw-output/
|
||||
build-wrapper*
|
||||
My Amplifier Results - */
|
||||
|
@ -611,6 +611,7 @@ void AbstractTableView::resizeEvent(QResizeEvent* event)
|
||||
if(event->size().height() != event->oldSize().height())
|
||||
{
|
||||
updateScrollBarRange(getRowCount());
|
||||
emit viewableRowsChanged(getViewableRowsCount());
|
||||
mShouldReload = true;
|
||||
}
|
||||
QWidget::resizeEvent(event);
|
||||
@ -852,8 +853,6 @@ void AbstractTableView::updateScrollBarRange(dsint range)
|
||||
verticalScrollBar()->setRange(0, 0);
|
||||
verticalScrollBar()->setSingleStep(getRowHeight());
|
||||
verticalScrollBar()->setPageStep(viewableRowsCount * getRowHeight());
|
||||
|
||||
emit viewableRowsChanged(viewableRowsCount);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -48,19 +48,20 @@ public:
|
||||
void filter(const QString & filter, FilterType type, int startColumn) override
|
||||
{
|
||||
mSearchList->setRowCount(0);
|
||||
int newRowCount = 0;
|
||||
mSearchList->mData.clear();
|
||||
mSearchList->mData.reserve(mList->mData.size());
|
||||
mSearchList->mModules = mList->mModules;
|
||||
int rows = mList->getRowCount();
|
||||
for(int i = 0, j = 0; i < rows; i++)
|
||||
for(int i = 0; i < rows; i++)
|
||||
{
|
||||
if(rowMatchesFilter(filter, type, i, startColumn))
|
||||
{
|
||||
mSearchList->setRowCount(j + 1);
|
||||
newRowCount++;
|
||||
mSearchList->mData.push_back(mList->mData.at(i));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
mSearchList->setRowCount(newRowCount);
|
||||
}
|
||||
|
||||
void addAction(QAction* action)
|
||||
|
@ -37,6 +37,10 @@ ZehSymbolTable::ZehSymbolTable(QWidget* parent)
|
||||
addColumnAt(2000, tr("Symbol (undecorated)"), true);
|
||||
loadColumnFromConfig("Symbol");
|
||||
updateColors();
|
||||
|
||||
trImport = tr("Import");
|
||||
trExport = tr("Export");
|
||||
trSymbol = tr("Symbol");
|
||||
}
|
||||
|
||||
QString ZehSymbolTable::getCellContent(int r, int c)
|
||||
@ -54,11 +58,11 @@ QString ZehSymbolTable::getCellContent(int r, int c)
|
||||
switch(info->type)
|
||||
{
|
||||
case sym_import:
|
||||
return tr("Import");
|
||||
return trImport;
|
||||
case sym_export:
|
||||
return tr("Export");
|
||||
return trExport;
|
||||
case sym_symbol:
|
||||
return tr("Symbol");
|
||||
return trSymbol;
|
||||
default:
|
||||
__debugbreak();
|
||||
}
|
||||
|
@ -22,6 +22,11 @@ private:
|
||||
std::vector<SYMBOLPTR> mData;
|
||||
QMutex mMutex;
|
||||
|
||||
//Caching of translations to fix a bottleneck
|
||||
QString trImport;
|
||||
QString trExport;
|
||||
QString trSymbol;
|
||||
|
||||
enum
|
||||
{
|
||||
ColAddr,
|
||||
|
Loading…
Reference in New Issue
Block a user