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.
Read the default font only once
Read default font only once for faster performance
JMeter test runs indicate that a single initialization of the default font reduces the HTTP response time by more than 50% and increases the throughout by more than 2x.
JMeter test runs were not exhaustive (30000 samples using a Linux controller running in a Docker container with the JMeter test from my Windows desktop), but they showed similar or better results on multiple runs.
Average response time before the change was 15ms. Average response time after the change ranged from 3-8 ms.
Median response time before the change was 10 ms. Median response time after the change was 2-3 ms with one 7ms outlier.
Throughput before the change was less than 200 requests per second. Throughput after the change was over 450 requests per second.
JMeter Aggregate Report Before
The JMeter aggregate test report before the change looked like this:
JMeter Aggregate Report After
The JMeter aggregate test report after the change looked like this: