[Ref] Use DNS text queries to resolve PCI IDs #3528
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #3483
To test this:
I've tested this on both real and virtual machines, and on both Windows and Linux. macOS does not need testing, as detecting GPUs in the first place isn't done there.
Internally, we now keep two
CacheStore
s for (1) vendor names and (2) device names. The vendor name cache is simply indexed by their ID, device names are indexed with either<DeviceSubID>_<VendorSubId>_<DeviceId>_<VendorId>
, if there are sub-IDs, or just<DeviceId>_<VendorId>
if there aren't. This key format is handy, since replacing the_
with.
nets us the DNS query prefix.Both caches are valid for 7 days. I've toned this down from 30, but the bandwidth used should still be much less than before (since we're just requesting individual IDs).
CC @gollux
This requires #3527, as
downloadFile
isn't used anymore (so Unimported will fail)Use the following Checklist if you have changed something on the Backend or Frontend: