danzuep / MailKitSimplified

Send and receive emails easily, fluently, with one line of code for each operation.
MIT License
61 stars 8 forks source link

GetMessageSummariesAsync in v2.5.6 takes a long time #38

Closed danzuep closed 9 months ago

danzuep commented 9 months ago

GetMessageSummariesAsync method is slow in v2.5.6.

https://github.com/danzuep/MailKitSimplified/issues/32#issuecomment-1723135408

danzuep commented 9 months ago

Thanks @faisalbwn for spotting this one. I've deployed a new version so let me know how it goes.

danzuep commented 9 months ago

I've removed the slow result filtering from Range().GetMessageSummariesAsync() which fixes the issue. This means that Query().GetMessageSummariesAsync() now returns results in ascending order to match MailKit, so anyone relying on that will now need to use the Linq.Reverse() method to get results in descending order again.

faisalbwn commented 9 months ago

Thanks Daniel, The fix is working fine for me.