salvois / LargeXlsx

A .net library to write large Excel files in XLSX format with low memory consumption using streamed write.
Other
204 stars 34 forks source link

Async API introduction #38

Open mzhavoronkov opened 10 months ago

mzhavoronkov commented 10 months ago

Hi ! I have a question regarding the implementation of the library: will there be any plans for async API for Excel writer? This may seem exotic but it's actually very useful: let's say you want to write an excel file to some external location (for example, AWS S3). You have implemented a new AmazonS3Stream (derived from Stream) for that purpose which sends some requests from time to time using AWS API. Those requests are asynchronous which means that whole new AmazonS3Stream is asynchronous as well. But async Stream API is not supported by the library, so you will need to put GetAwaiter().GetResult() everywhere, which is not very nice :(

So, what would you think if we introduce that into the library? I can help if help is needed.

salvois commented 10 months ago

Hi @mzhavoronkov , that definitely makes sense! Kestrel-based writers may benefit from this too. Thanks for your suggestion, I'll think about it. Salvo