Repository navigation
Conversation
Reuse extracted values for five seconds and apply missing fields from each call's own fallback. Keep missed-scan caching and force refresh intact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #60.
When a running client is found, reuse the values read from its memory for five seconds instead of scanning the process once per torrent. The existing 60-second cache for unsuccessful searches stays in place.
The cache stores only values actually read from memory. Missing fields still come from each torrent's own generated fallback, rather than being copied from the first torrent. Regenerate Identity bypasses both caches and performs a fresh scan.
Updated the scanner tests and added a factory-level test that creates 1,000 torrents with a fake running uTorrent process and checks that its memory is opened only once.
I haven't benchmarked a real running uTorrent or run .NET 10 tests locally; the SDK and uTorrent aren't available here. CI and a real-client performance check are still needed.