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.
Asynchronous Processing:
ProcessDatabase
to support asynchronous execution by utilizingAsyncParsableCommand
.PIRProcessDatabase
by adding asynchronous processing enabled through the--parallel
flag with Swift concurrency.Also added
Sendable
conformance to several types to ensure safe concurrent access.Enhanced Logging:
--no-parallel
: https://pastebin.com/gWH1n9B7--parallel
: https://pastebin.com/QCrQMvJXPerformance Comparison, with 2 million numbers in identity.binpb:
Async Execution (
time PIRProcessDatabase --parallel identity-config.json
):1:
real 0m11.638s, user 1m8.456s, sys 0m3.310s
2:
real 0m10.835s, user 1m8.368s, sys 0m3.242s
3:
real 0m10.833s, user 1m8.215s, sys 0m3.077s
Sync Execution (
time PIRProcessDatabase --no-parallel identity-config.json
):1:
real 0m52.301s, user 0m49.667s, sys 0m1.936s
2:
real 0m52.117s, user 0m49.544s, sys 0m1.961s
3:
real 0m51.489s, user 0m49.378s, sys 0m1.789s
The asynchronous execution with
--parallel
demonstrates a significant reduction in real execution time compared to the synchronous approach.P.S. identity-config.json: