• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jstedfast / MimeKit / 4.1.0.926
94%

Build:
DEFAULT BRANCH: master
Ran 02 Sep 2023 01:16AM UTC
Jobs 1
Files 184
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Sep 2023 01:05AM UTC coverage: 93.527% (-0.03%) from 93.553%
4.1.0.926

push

coveralls.net

jstedfast
Reduced memory allocations in Rfc2047.DecodePhrase() and DecodeText()

By pushing the DecodeTokens() logic into a new interface so that decoding
can be done incrementally as we tokenize the phrase/text, we can avoid
allocating a List<Token> (and all of the tokens that goes with it) which
can drastically reduce GC pressure, especially when calling MailKit's
ImapFolder.Fetch/Async() methods with MessageSummaryItems.Envelope.

(IMAP FETCH responses including ENVELOPE metadata require decoding of
rfc2047-encoded strings, so DecodeText() and DecodePhrase() end up being
fairly performance critical - not as much as tokenization of IMAP
responses, but pretty high up there.)

This also slightly increases benchmark performance as well:

Before:

BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK 8.0.100-preview.7.23376.3
  [Host]     : .NET 6.0.21 (6.0.2123.36311), X64 RyuJIT AVX2
  DefaultJob : .NET 6.0.21 (6.0.2123.36311), X64 RyuJIT AVX2

|               Method |     Mean |     Error |    StdDev |
|--------------------- |---------:|----------:|----------:|
|   Rfc2047_DecodeText | 1.033 us | 0.0083 us | 0.0078 us |
| Rfc2047_DecodePhrase | 1.024 us | 0.0055 us | 0.0046 us |

After:

|               Method |     Mean |    Error |   StdDev |   Median |
|--------------------- |---------:|---------:|---------:|---------:|
|   Rfc2047_DecodeText | 973.0 ns | 18.20 ns | 30.41 ns | 956.5 ns |
| Rfc2047_DecodePhrase | 899.5 ns |  3.82 ns |  3.57 ns | 898.7 ns |

30446 of 32553 relevant lines covered (93.53%)

51847.59 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
85.84
-0.35% D/a/MimeKit/MimeKit/MimeKit/Cryptography/WindowsSecureMimeContext.cs
16
98.34
-0.71% D/a/MimeKit/MimeKit/MimeKit/Utils/Rfc2047.cs
Jobs
ID Job ID Ran Files Coverage
1 4.1.0.926.1 02 Sep 2023 01:16AM UTC 184
93.53
Source Files on build 4.1.0.926
  • Tree
  • List 184
  • Changed 19
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 76839db9 on github
  • Prev Build on master (#4.1.0.925)
  • Next Build on master (#4.1.0.927)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc