perf: cache NamingSystem URLs and send usage stats asynchronously#1254
Closed
jmandel wants to merge 1 commit intoHL7:masterfrom
Closed
perf: cache NamingSystem URLs and send usage stats asynchronously#1254jmandel wants to merge 1 commit intoHL7:masterfrom
jmandel wants to merge 1 commit intoHL7:masterfrom
Conversation
Two changes: 1. ValidationServices.resolveURL(): cache NamingSystem URLs in a HashSet on first use, then do O(1) lookups instead of iterating all NamingSystems on every call. This method is called for every URL resolved during validation. (168 CPU samples in profiling) 2. PublisherGenerator: send usage statistics via a daemon thread instead of blocking the main thread with an HTTP call.
Contributor
|
The naming system improvements were implemented elsewhere. The usage statistics were already in another thread, so no change |
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.
Summary
Two changes:
ValidationServices.resolveURL(): Cache NamingSystem URLs in aHashSeton first use, then do O(1) lookups instead of iterating all NamingSystems on every call. This method is called for every URL resolved during validation. (168 CPU samples in JFR profiling against US Core 9.0.0)PublisherGenerator: Send usage statistics via a daemon thread instead of blocking the main thread with an HTTP call.A/B Benchmark
Part of a set of independent changes across Core and Publisher producing 31% overall speedup on US Core 9.0.0. Full details: https://github.com/jmandel/igpublisher-perf