ekalchev

Results 14 comments of ekalchev

I'll give you one use case that this is a big problem: You are writing base functionality that other users should use. AsyncContextThread is implementation details that is not visible...

I am using single connection and sync methods only. To make it simple, I created a small console app to reproduce this ```CSharp using MailKit; using MailKit.Net.Imap; using System; using...

That is correct. But the lifetime of the program is one call to Fetch method (or at least the significant part of it) which generates 130k Task\ allocations for single...

Having byte[] and string allocations reduced will be great! I was thinking that probably `ReadOnlySpan` will be huge for MailKit and MimeKit in the future since you can completely avoid...

I spent a few hours to convert Fetch method and its dependency methods to pure 'sync' methods. This is the result (there are still `Task` but I they come from...

Looks great! Here comparison - both ran for ~17k message summaries Before: ![image](https://user-images.githubusercontent.com/10009149/154650733-10be2cb9-74f6-4f47-a26c-0661e23753e4.png) After ![image](https://user-images.githubusercontent.com/10009149/155176788-9b5ab8c0-c303-44e0-9296-5bf6cf9ad89e.png)

> ValueTask (sadly only available in netstandard2.1+ and net5.0+, so I'll have to figure out a nice way of supporting net4x and netstandard2.0). You can use `ValueTask` with .net4x by...

Thanks for your efforts on this.

I see this as difference between v3.2.0 and latest master ![Screenshot-1](https://user-images.githubusercontent.com/10009149/171199189-9c068d34-dd18-47ff-aa70-078ee25e82ef.png) latest master ![Screenshot-2](https://user-images.githubusercontent.com/10009149/171199205-4a023af3-89fd-4ded-acbd-f95363fe0809.png) This method has biggest potential for memory savings if converted to synchronous ![image](https://user-images.githubusercontent.com/10009149/171200409-d279755b-2c7e-43e0-b665-8ccf5fb855f4.png)