Title: Synchronous Task.WaitAll() in LoqQueue causes async/await performance problems in .NET Core · Issue #84 · stackify/stackify-api-dotnet · GitHub
Open Graph Title: Synchronous Task.WaitAll() in LoqQueue causes async/await performance problems in .NET Core · Issue #84 · stackify/stackify-api-dotnet
X Title: Synchronous Task.WaitAll() in LoqQueue causes async/await performance problems in .NET Core · Issue #84 · stackify/stackify-api-dotnet
Description: I have an Azure function app that's performance-critical. After instrumenting it with NLog and a StackifyTarget with an AsyncWrapper, I was perplexed to be observing the following: As you can see, a request that I would have expected to ...
Open Graph Description: I have an Azure function app that's performance-critical. After instrumenting it with NLog and a StackifyTarget with an AsyncWrapper, I was perplexed to be observing the following: As you can see, ...
X Description: I have an Azure function app that's performance-critical. After instrumenting it with NLog and a StackifyTarget with an AsyncWrapper, I was perplexed to be observing the following: As you can s...
Opengraph URL: https://github.com/stackify/stackify-api-dotnet/issues/84
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Synchronous Task.WaitAll() in LoqQueue causes async/await performance problems in .NET Core","articleBody":"I have an Azure function app that's performance-critical. After instrumenting it with NLog and a StackifyTarget with an AsyncWrapper, I was perplexed to be observing the following:\r\n\r\n\r\nAs you can see, a request that I would have expected to execute in 20ms instead took 775ms (39x longer!) due to what looks like blocking code from the StackifyTarget. Thinking perhaps the NLog AsyncWrapper wasn't behaving as it should, I did some debugging and found that the wrapper itself is behaving as expected.\r\n\r\nDigging deeper, I found that the AsyncWrapper is pretty useless when used in conjunction with the StackifyTarget, as the StackifyTarget itself queues messages up for \"asynchronous\" uploading using [System.Threading.Timer](https://github.com/stackify/stackify-api-dotnet/blob/f04e9f12d61504dbc9dec7a66a7e8cbbc1f86058/CoreSrc/StackifyLib/Internal/Logs/LogQueue.cs#L52).\r\n\r\nThis would be great _if_ the timer function was actually asynchronous. [It's not.](https://github.com/stackify/stackify-api-dotnet/blob/f04e9f12d61504dbc9dec7a66a7e8cbbc1f86058/CoreSrc/StackifyLib/Internal/Logs/LogQueue.cs#L324)\r\n\r\nMy code, which uses async/await code for all I/O operations, is now sharing a threadpool with a synchronous, I/O-bound resource hog.","author":{"url":"https://github.com/AdamEssenmacher","@type":"Person","name":"AdamEssenmacher"},"datePublished":"2019-02-26T01:27:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/84/stackify-api-dotnet/issues/84"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4a21adb4-c5e7-b02b-5214-41c6084c065e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B328:202F53:32AA091:458AF5B:6973D02A |
| html-safe-nonce | 3e8c55abca8b0f702ec86d3aa5050d615c6d3bf49106567ef43bece8ab0959db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzI4OjIwMkY1MzozMkFBMDkxOjQ1OEFGNUI6Njk3M0QwMkEiLCJ2aXNpdG9yX2lkIjoiMzM4MzczNjk2NDU1MTUyODQ5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c7b9a46d24108456a6e6c17dd9636c96302db8a750c8773c9ff87b7c77d0dfa6 |
| hovercard-subject-tag | issue:414386110 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackify/stackify-api-dotnet/84/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b274c268598c799daad9f476635cbab19acac710ef2369e7e6a1933aed70cb54/stackify/stackify-api-dotnet/issues/84 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b274c268598c799daad9f476635cbab19acac710ef2369e7e6a1933aed70cb54/stackify/stackify-api-dotnet/issues/84 |
| og:image:alt | I have an Azure function app that's performance-critical. After instrumenting it with NLog and a StackifyTarget with an AsyncWrapper, I was perplexed to be observing the following: As you can see, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AdamEssenmacher |
| hostname | github.com |
| expected-hostname | github.com |
| None | cee21c7b1ab632710d33905bc72e5e9e520eab75c9a12e16c2ce9e8f6e031e06 |
| turbo-cache-control | no-preview |
| go-import | github.com/stackify/stackify-api-dotnet git https://github.com/stackify/stackify-api-dotnet.git |
| octolytics-dimension-user_id | 3323157 |
| octolytics-dimension-user_login | stackify |
| octolytics-dimension-repository_id | 26443472 |
| octolytics-dimension-repository_nwo | stackify/stackify-api-dotnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26443472 |
| octolytics-dimension-repository_network_root_nwo | stackify/stackify-api-dotnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f5f1d4f67b002a74550b90d5c1c0f0899544c742 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width