mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Performance issue with multiple httpclients (since version 1.2.10) #276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tully2003 on GitHub (May 24, 2020).
Originally assigned to: @StefH on GitHub.
I am experiencing a performance issue following an upgrade from 1.2.9 and the issue affects all subsequent versions.
There appears to be a startup cost ~2 seconds for the first request to a mocked endpoint per HttpClient used, in version 1.2.9 this cost only occurred once but in >1.2.9 this cost is there per request.
You can use the following code to replicate the issue
output 1.2.9
output 1.2.12
Running on
@StefH commented on GitHub (May 24, 2020):
Thanks for the analysis.
Can you please make a GitHub project where you have 2 projects:
The performance issue could maybe be related to "Handlebars.Net.Helpers", I need to check.
@StefH commented on GitHub (May 24, 2020):
I did quick test for just Handlebars.Net.Helpers:
That does not seem to be the issue.
@tully2003 commented on GitHub (May 24, 2020):
sure, added a repo here => https://github.com/tully2003/issues-wiremock-474.perf
@StefH commented on GitHub (May 24, 2020):
I can see the delay from 2 second in your test program.
When running on WSL Ubuntu, there's no delay.
The difference in the code which is the cause of the error is:
I've fixed it, and a new version will be uploaded to NuGet.
Thank you.
@StefH commented on GitHub (May 24, 2020):
https://github.com/WireMock-Net/WireMock.Net/pull/475
@tully2003 commented on GitHub (May 25, 2020):
Awesome, thanks for fixing so quickly 😀