mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-03 16:01:08 +00: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
@ -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 New Issue
Block a user