mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08:00
Optimize torrentRow a bit
The problem is that torrentRow() does linear search over the list of all available torrents. So it doesn't scale well for large number of torrents. Removing the copying of QString from linear search inner loop, speed up it considerably. The proper solution should be using hash table instead of linear search. This require more radical changes in TorrentModel and may be done in a separate commit.
This commit is contained in:
parent
3202ad368f
commit
2e55c1f307
@ -57,7 +57,7 @@ public:
|
||||
inline int columnCount() const { return NB_COLUMNS; }
|
||||
QVariant data(int column, int role = Qt::DisplayRole) const;
|
||||
bool setData(int column, const QVariant &value, int role = Qt::DisplayRole);
|
||||
inline QString hash() const { return m_hash; }
|
||||
inline QString const& hash() const { return m_hash; }
|
||||
State state() const;
|
||||
|
||||
signals:
|
||||
|
Loading…
Reference in New Issue
Block a user