mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
WebUI: Improve lookup performance when filtering by tracker
Torrent hashes in tracker list are now kept in sets instead of arrays. PR #21405.
This commit is contained in:
parent
449ca96e28
commit
d8e24314ec
2 changed files with 2 additions and 3 deletions
|
@ -805,8 +805,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
trackerListItem = { host: host, trackerTorrentMap: new Map() };
|
||||
trackerList.set(hash, trackerListItem);
|
||||
}
|
||||
|
||||
trackerListItem.trackerTorrentMap.set(tracker, [...torrents]);
|
||||
trackerListItem.trackerTorrentMap.set(tracker, new Set(torrents));
|
||||
}
|
||||
updateTrackers = true;
|
||||
}
|
||||
|
|
|
@ -1485,7 +1485,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
if (tracker) {
|
||||
let found = false;
|
||||
for (const torrents of tracker.trackerTorrentMap.values()) {
|
||||
if (torrents.includes(row["full_data"].rowId)) {
|
||||
if (torrents.has(row["full_data"].rowId)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue