Conversation
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Replaced regexes with hand-crafted loops based on hot spots identified by the StackProfiler during parsing of a large valueSet. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
1. introduced run options under FHIRBenchmarkRunner for setting JMH params instead of passing via system properties 2. refactored FHIRParserBenchmark to use JMH params 3. introduced LargeValueSetCreator under fhir-examples-generator and specific examples for json and xml 4. added FHIRValueSetBenchmarks for measuring ValueSet parse times 5. added LargeValueSetCreator variants for creating HashSet and text file equivalents, and added Benchmarks for measuring parse times for those as well Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
1. Code subtypes now use their builders for static initialization and static `of` helpers just return one of these constants. This avoids unneccessarilly constructing new instances which carries a slight validation cost. 2. String, Uri, and certain String/Uri subtypes now use java-based validation from ValidationSupport instead of regex / pattern matching Lock in the model updates by updating CodeGenerator. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
1. use `ValueSet.from` instead of `ValueSet.valueOf` which only works with the ValueSet.name filed (e.g. ADDRESS vs Address) 2. fix FHIRGeneratorBenchmark to match FHIRParserBenchmark 3. if we get an unexpected ValueSet in the `of` static factory helper, throw IllegalStateException instead of IllegalArgumentException since we should never get there unless someone hand-edits the generated class Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
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.
fhir-benchmark and related edits
introduced run options under FHIRBenchmarkRunner for setting JMH
params instead of passing via system properties
refactored FHIRParserBenchmark to use JMH params
introduced LargeValueSetCreator under fhir-examples-generator and
specific examples for json and xml
added FHIRValueSetBenchmarks for measuring ValueSet parse times
added LargeValueSetCreator variants for creating HashSet and text
file equivalents, and added Benchmarks for measuring parse times for
those as well
fhir-model perf tweaks
Code subtypes now use their builders for static initialization and
static
ofhelpers just return one of these constants. This avoidsunneccessarilly constructing new instances which carries a slight
validation cost.
String, Uri, and certain String/Uri subtypes now use java-based
validation from ValidationSupport instead of regex / pattern matching
For an overview of the test results, please see issue #424. On my local system, performance improved about 20% while loading a large valueset of Strings, Codes, and Uris. Unfortunately, overall parsing performance seems to be about the same (at least for the spec examples).